|
| 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 | +```` |
0 commit comments