API yang ada pada repositori ini digunakan untuk melakukan pengumpulan data serta penghasilan rekomendasi.
Get All Node
url:: /api/v1/nodes method:: GET return:: JSON param:: -- output:: { buyer: { 0: { userid: "dvdekow" } 1: { userid: "davideko" } 2: { userid: "kowib" } } message: "OK" }
Create Node
Create Buyer Node url:: /api/v1/nodes method:: POST return:: JSON param:: userid:string output:: { userid: "david006" node: { userid: "david006" } message: "Buyer node has been created" } Create Item Node url:: /api/v1/nodes method:: POST return:: JSON param:: itemid:string output:: { itemid: "david006" node: { ]itemid: "zfone2" } message: "Item node has been created" }
Update/Add Node Attributes
Update/Add Buyer Node Attributes url:: /api/v1/node/{userid} method:: PUT return:: JSON param:: change:string param:: value:string output:: { userid: "david006" node: { userid: "david001" } message: "Node attributes updated" }
Update/Add Item Node Attributes
url:: /api/v1/node/{itemid} method:: PUT return:: JSON param:: change:string param:: value:string output:: { itemid: "zfone2" node: { itemid: "zfone5" } message: "Node attributes updated" }
Create relation
Pada API ini jika Node Buyer atau Item belum dibuat maka Node tersbut akan dibuat terlebih dahulu lalu dibuat relasinya. Untuk type yang digunakan sebagai parameter adalah "look" dan "purchase" url:: /api/v1/relations/ method:: POST return:: JSON param:: userid:string param:: itemid:string param:: type:string output:: { relation: { rating: 1, type: "look" } message: "look relation has been created" }
Get Recommendation
url:: /api/v1/recommendation/{userid} method:: GET return:: JSON output:: { recommendation: { columns: [ "Item" "Recommendation" ] data: [ [ "hp345", 1 ] ] } message: "Recommendation generated" }