Skip to content

Commit fa34e16

Browse files
committed
Merge pull request #1 from andylib/master
Update product.md
2 parents 0e7b798 + 11b0055 commit fa34e16

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

product.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/a
6666
"hubmeup_link": "http://www.hubmeup.com/tes-102/",
6767
"from_app": null,
6868
"id_supercat": "1",
69+
"id_buyercat": "1",
6970
"id_superloc": "11",
7071
"discount": "0",
7172
"view_count": "0",
@@ -78,6 +79,10 @@ curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/a
7879
"idsc": "1",
7980
"name": "Perlengkapan Olahraga"
8081
},
82+
"buyercat": {
83+
"idbc": "15",
84+
"name": "Alat & Perlengkapan Olahraga"
85+
},
8186
"superloc": {
8287
"idsl": "11",
8388
"name": "Jawa Tengah"
@@ -152,8 +157,9 @@ Get product by user
152157
+ `limit` _`optional`_ Limit for browse. Default <code>6</code>
153158
+ `offset` _`optional`_ Limit for browse. Default <code>1</code>
154159
+ `keyword` _`optional`_ Search key
155-
+ `id_supercat` _`optional`_ Location ID
156-
+ `id_superloc` _`optional`_ Category ID
160+
+ `id_supercat` _`optional`_ Category ID
161+
+ `id_buyercat` _`optional`_ Buyer Category ID
162+
+ `id_superloc` _`optional`_ Location ID
157163
+ `tag` _`optional`_ Tag filter
158164
+ `filter` _`optional`_ filter for browse, enum <code>all</all> or <code>own</code>. Default <code>all</code>
159165
+ `since_time` _`optional`_ Browse product from since_time
@@ -263,7 +269,8 @@ Get product by category
263269
/api/v2/product/get_product_user
264270

265271
##### <a name="get-product-cat-param"></a> Parameters
266-
+ `id_supercat` ___`required`___ Category ID
272+
+ `id_supercat` Category ID
273+
+ `id_buyercat` Buyer Category ID (One of id_supercat & id_buyercat is required)
267274
+ `limit` _`optional`_ Limit for browse. Default <code>6</code>
268275
+ `offset` _`optional`_ Limit for browse. Default <code>1</code>
269276
+ `keyword` _`optional`_ Search key
@@ -300,6 +307,7 @@ Add Product
300307
+ `prod_tag` ___`required`___ pisah dengan <code>,</code>
301308
+ `prod_desc` ___`required`___
302309
+ `id_supercat` ___`required`___
310+
+ `id_buyercat` ___`required`___
303311
+ `id_superloc` ___`required`___
304312
+ `condition` _`optional`_
305313
+ `is_nego` _`optional`_
@@ -349,6 +357,10 @@ curl -X POST --data "prod_title=Baju&prod_price=15000&prod_curr=IDR&prod_desc=ju
349357
"idsc": "1",
350358
"name": "Perlengkapan Olahraga"
351359
},
360+
"buyercat": {
361+
"idsc": "15",
362+
"name": "Alat & Perlengkapan Olahraga"
363+
},
352364
"superloc": {
353365
"idsl": "1",
354366
"name": "Jawa Timur"

user.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
+ [Parameters](#edit-user-param)
1616
+ [Sample Request](#edit-user-request)
1717
+ [Sample Response](#edit-user-response)
18+
- [Track User's Action](#track-user-action)
19+
1820

1921
#### <a name="get-active-user"></a> `🔒` `GET` Get Active User
2022
Get information about active user. include count product, following, follower, and (rating [not yet])
@@ -210,3 +212,33 @@ curl -X POST --data "name=hayashi" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490
210212
"status": 1
211213
}
212214
````
215+
216+
#### <a name="track-user-action"></a> `POST` Track User's Action
217+
Track User's Action
218+
219+
##### <a name="track-user-action-url"></a> Resource URL
220+
/api/v2/user/action_track
221+
222+
##### <a name="track-user-action-params"></a> Parameters
223+
224+
json array of [
225+
226+
+ `id` track id, should be globally unique. Can be done using md5(random_string)
227+
+ `resource` e.g : Profile / Feed / Browse.
228+
+ `action` e.g : open / close
229+
+ `time` e.g : 2014-03-10 08:20:10
230+
231+
]
232+
233+
##### <a name="track-user-action-request"></a>Sample Request
234+
````sh
235+
curl -X POST --data "data=[{\"id\": \"jasklfdjs8378329\", \"resource\": \"Profile\", \"action\": \"open\", \"time\": \"2014-03-10 08:20:10\"}]" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/user/action_track
236+
````
237+
238+
##### <a name="track-user-action-response"></a>Sample Response
239+
240+
````json
241+
{
242+
"status": 1
243+
}
244+
````

0 commit comments

Comments
 (0)