Skip to content

Commit 97c1381

Browse files
committed
add Follow API Documentation
1 parent 4c93ee2 commit 97c1381

File tree

5 files changed

+294
-16
lines changed

5 files changed

+294
-16
lines changed

β€Ž.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
*.html
1+
*.html
2+
.idea

β€ŽREADME.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
11
## Shoop API Documentation
22

33
Ini adalah API Documentation untuk [Shoop](http://www.getshoop.com/). Shoop adalah mobile marketplace yang bisa memberikan info produk sesuai kebutuhan dan minat anda.
4+
5+
+ Auth API
6+
- `POST` [Get Key (Login)](auth.md#get-key)
7+
- `POST` [Register](auth.md#register)
8+
- `POST` [Forgot Password](auth.md#forgot-password)
9+
+ User API
10+
- `πŸ”’` `GET` [Get Active User](user.md#get-active-user)
11+
- `πŸ”’` `GET` [Get User](user.md#get-user)
12+
- `πŸ”’` `POST` [Edit User](user.md#edit-user)
13+
- Get User Setting
14+
- Set User Setting
15+
+ Product API
16+
- Get Detail Product
17+
- Get List Product
18+
- Get
19+
+ Store API
20+
+ Social API
21+
+ Rate API
22+
+ Shoop (Like) API
23+
+ Comment API
24+
+ Follow API
25+
- `πŸ”’` `GET` [Get Following](follow.md#get-following)
26+
- `πŸ”’` `GET` [Get Follower](follow.md#get-follower)
27+
- `πŸ”’` `POST` [Follow User](follow.md#follow)
28+
- `πŸ”’` `POST` [Unfollow User](follow.md#unfollow)
29+
+ Invite API
30+
+ Notification API
31+
+ Category API
32+
+ Location API
33+
+ Cart API
34+
+ Nego API
35+
+ Payment API
File renamed without changes.

β€Žfollow.md

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
## Follow API Documentation
2+
3+
- [Get Following](#get-following)
4+
+ [Resource URL](#get-following-url)
5+
+ [Parameters](#get-following-param)
6+
+ [Sample Request](#get-following-request)
7+
+ [Sample Response](#get-following-response)
8+
- [Get Follower](#get-follower)
9+
+ [Resource URL](#get-follower-url)
10+
+ [Parameters](#get-follower-param)
11+
+ [Sample Request](#get-follower-request)
12+
+ [Sample Response](#get-follower-response)
13+
- [Follow User](#follow)
14+
+ [Resource URL](#follow-url)
15+
+ [Parameters](#follow-param)
16+
+ [Sample Request](#follow-request)
17+
+ [Sample Response](#follow-response)
18+
- [Unfollow User](#unfollow)
19+
+ [Resource URL](#unfollow-url)
20+
+ [Parameters](#unfollow-param)
21+
+ [Sample Request](#unfollow-request)
22+
+ [Sample Response](#unfollow-response)
23+
24+
25+
#### <a name="get-following"></a> `πŸ”’` `GET` Get Following
26+
Get list of following from user
27+
28+
##### <a name="get-following-url"></a> Resource URL
29+
/api/v2/follow/get_following
30+
31+
##### <a name="get-following-param"></a> Parameters
32+
+ `id_user` _`optional`_ User whose following. Default `active user`
33+
+ `limit` _`optional`_ Limit list of following. Default `20`
34+
+ `offset` ._`optional`_ Offset list of following. Default `0`
35+
36+
##### <a name="get-following-request"></a>Sample Request
37+
````sh
38+
curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/get_following
39+
````
40+
41+
##### <a name="get-following-response"></a>Sample Response
42+
43+
````json
44+
{
45+
"status": 1,
46+
"count": 2,
47+
"follower": [
48+
{
49+
"avatar": null,
50+
"name": "null",
51+
"id": "304",
52+
"following": 1
53+
},
54+
{
55+
"avatar": "2655.jpg",
56+
"name": "imelyaa",
57+
"id": "2655",
58+
"following": 1
59+
}
60+
]
61+
}
62+
````
63+
64+
#### <a name="get-follower"></a> `πŸ”’` `GET` Get Follower
65+
Get list of follower from user
66+
67+
##### <a name="get-follower-url"></a> Resource URL
68+
/api/v2/follow/get_follower
69+
70+
##### <a name="get-follower-param"></a> Parameters
71+
+ `id_user` _`optional`_ User whose follow by other user. Default `active user`
72+
+ `limit` _`optional`_ Limit list of follower. Default `20`
73+
+ `offset` ._`optional`_ Offset list of follower. Default `0`
74+
75+
##### <a name="get-following-request"></a>Sample Request
76+
````sh
77+
curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/get_follower?id_user=1
78+
````
79+
80+
##### <a name="get-following-response"></a>Sample Response
81+
82+
````json
83+
{
84+
"status": 1,
85+
"count": 15,
86+
"follower": [
87+
{
88+
"avatar": null,
89+
"name": "",
90+
"id": "344",
91+
"following": 0
92+
},
93+
{
94+
"avatar": null,
95+
"name": "",
96+
"id": "372",
97+
"following": 0
98+
},
99+
{
100+
"avatar": null,
101+
"name": "",
102+
"id": "388",
103+
"following": 0
104+
},
105+
{
106+
"avatar": null,
107+
"name": "aku",
108+
"id": "615",
109+
"following": 0
110+
},
111+
{
112+
"avatar": null,
113+
"name": "aku",
114+
"id": "666",
115+
"following": 0
116+
},
117+
{
118+
"avatar": null,
119+
"name": "aku",
120+
"id": "672",
121+
"following": 0
122+
},
123+
{
124+
"avatar": null,
125+
"name": "putra",
126+
"id": "687",
127+
"following": 0
128+
},
129+
{
130+
"avatar": null,
131+
"name": "wek",
132+
"id": "688",
133+
"following": 0
134+
},
135+
{
136+
"avatar": null,
137+
"name": "aku",
138+
"id": "715",
139+
"following": 0
140+
},
141+
{
142+
"avatar": null,
143+
"name": "aku",
144+
"id": "719",
145+
"following": 0
146+
},
147+
{
148+
"avatar": null,
149+
"name": "aku",
150+
"id": "828",
151+
"following": 0
152+
},
153+
{
154+
"avatar": null,
155+
"name": "putra",
156+
"id": "2617",
157+
"following": 0
158+
},
159+
{
160+
"avatar": null,
161+
"name": "afi",
162+
"id": "2621",
163+
"following": 0
164+
},
165+
{
166+
"avatar": null,
167+
"name": "",
168+
"id": "2695",
169+
"following": 0
170+
},
171+
{
172+
"avatar": null,
173+
"name": "melya@tesshoop1.com",
174+
"id": "2743",
175+
"following": 0
176+
}
177+
]
178+
}
179+
````
180+
181+
#### <a name="follow"></a> `πŸ”’` `POST` Follow
182+
Follow another user
183+
184+
##### <a name="follow-url"></a> Resource URL
185+
/api/v2/follow/following
186+
187+
##### <a name="follow-param"></a> Parameters
188+
+ `user` ___`required`___ User who want to follow. It can be `array of integer` or single `integer`
189+
190+
##### <a name="follow-request"></a>Sample Request
191+
````sh
192+
curl -X POST --data "user[]=5&user[]=4" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/following
193+
````
194+
195+
##### <a name="follow-response"></a>Sample Response
196+
197+
````json
198+
{
199+
"status": 1
200+
}
201+
````
202+
203+
#### <a name="follow"></a> `πŸ”’` `POST` Follow
204+
Follow another user
205+
206+
##### <a name="follow-url"></a> Resource URL
207+
/api/v2/follow/following
208+
209+
##### <a name="follow-param"></a> Parameters
210+
+ `user` ___`required`___ User who want to follow. It can be `array of integer` or single `integer`
211+
212+
##### <a name="follow-request"></a>Sample Request
213+
````sh
214+
curl -X POST --data "user[]=5&user[]=4" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/following
215+
````
216+
217+
##### <a name="follow-response"></a>Sample Response
218+
219+
````json
220+
{
221+
"status": 1
222+
}
223+
````
224+
225+
#### <a name="unfollow"></a> `πŸ”’` `POST` Follow
226+
Unfollow another user
227+
228+
##### <a name="unfollow-url"></a> Resource URL
229+
/api/v2/follow/unfollow
230+
231+
##### <a name="unfollow-param"></a> Parameters
232+
+ `id_user` ___`required`___ User who want to follow. type `integer`
233+
234+
##### <a name="unfollow-request"></a>Sample Request
235+
````sh
236+
curl -X POST --data "id_user=4" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/unfollow
237+
````
238+
239+
##### <a name="unfollow-response"></a>Sample Response
240+
241+
````json
242+
{
243+
"status": 1
244+
}
245+
````

β€Žuser.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
## User API Documentation
22

33
- [Get Active User](#get-active-user)
4-
+ [Resource URL](#get-active-user-url)
5-
+ [Parameters](#get-active-user-param)
6-
+ [Sample Request](#get-active-user-request)
7-
+ [Sample Response](#get-active-user-response)
4+
+ [Resource URL](#get-active-user-url)
5+
+ [Parameters](#get-active-user-param)
6+
+ [Sample Request](#get-active-user-request)
7+
+ [Sample Response](#get-active-user-response)
88
- [Get User](#get-user)
9-
+ [Resource URL](#get-user-url)
10-
+ [Parameters](#get-user-param)
11-
+ [Sample Request](#get-user-request)
12-
+ [Sample Response](#get-user-response)
9+
+ [Resource URL](#get-user-url)
10+
+ [Parameters](#get-user-param)
11+
+ [Sample Request](#get-user-request)
12+
+ [Sample Response](#get-user-response)
1313
- [Edit User](#edit-user)
14-
+ [Resource URL](#edit-user-url)
15-
+ [Parameters](#edit-user-param)
16-
+ [Sample Request](#edit-user-request)
17-
+ [Sample Response](#edit-user-response)
14+
+ [Resource URL](#edit-user-url)
15+
+ [Parameters](#edit-user-param)
16+
+ [Sample Request](#edit-user-request)
17+
+ [Sample Response](#edit-user-response)
1818

19-
#### <a name="get-active-user"></a> `GET` `πŸ”’` Get Active User
19+
#### <a name="get-active-user"></a> `πŸ”’` `GET` Get Active User
2020
Get information about active user. include count product, following, follower, and (rating [not yet])
2121

2222
##### <a name="get-active-user-url"></a> Resource URL
@@ -78,7 +78,7 @@ curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/a
7878
}
7979
````
8080

81-
#### <a name="get-user"></a> `GET` `πŸ”’` Get User
81+
#### <a name="get-user"></a> `πŸ”’` `GET` Get User
8282
Get information about another user. include count product, following, follower, and (rating [not yet])
8383

8484
##### <a name="get-user-url"></a> Resource URL
@@ -119,7 +119,7 @@ curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/a
119119
}
120120
````
121121

122-
#### <a name="edit-user"></a> `POST` `πŸ”’` Edit User
122+
#### <a name="edit-user"></a> `πŸ”’` `POST` Edit User
123123
Edit active user
124124

125125
##### <a name="get-user-url"></a> Resource URL

0 commit comments

Comments
Β (0)