Skip to content

Commit 2060e01

Browse files
author
Bryan Berg
committed
Followers/following endpoints
1 parent c2a5ab1 commit 2060e01

File tree

2 files changed

+118
-0
lines changed

2 files changed

+118
-0
lines changed

resources/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ Guiding principles are:
3434
<td>DELETE</td>
3535
<td><a href="/appdotnet/api-spec/blob/master/resources/users.md#unfollow-a-user">Unfollow a User</a></td>
3636
</tr>
37+
<tr>
38+
<td>/stream/0/users/[user_id]/following</td>
39+
<td>GET</td>
40+
<td><a href="/appdotnet/api-spec/blob/master/resources/users.md#list-users-a-user-is-following">List users a User is following</a></td>
41+
</tr>
42+
<tr>
43+
<td>/stream/0/users/[user_id]/followers</td>
44+
<td>GET</td>
45+
<td><a href="/appdotnet/api-spec/blob/master/resources/users.md#list-users-following-a-user">List users following a User</a></td>
46+
</tr>
3747
</tbody>
3848
</table>
3949

resources/users.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,111 @@ None.
183183
"username": "mthurman"
184184
}
185185
```
186+
187+
## List users a user is following
188+
189+
Returns an array of <a href="/appdotnet/api-spec/blob/master/objects.md#user">User</a> objects the specified user is following.
190+
191+
### URL
192+
193+
> https://alpha-api.app.net/stream/0/users/[user_id]/following
194+
195+
### Parameters
196+
197+
None.
198+
199+
### Example
200+
201+
> GET https://alpha-api.app.net/stream/0/users/1/following
202+
```js
203+
[
204+
{
205+
"app_data": null,
206+
"avatar_image": {
207+
"height": "500",
208+
"url": "https://d2o3sl9fkn83li.cloudfront.net/assets/user/20/00/00/2000000000000000.png",
209+
"width": "500"
210+
},
211+
"counts": {
212+
"followed_by": "0",
213+
"follows": "0",
214+
"posts": "0"
215+
},
216+
"cover_image": {
217+
"height": "686",
218+
"url": "https://d2o3sl9fkn83li.cloudfront.net/assets/user/91/00/00/9100000000000000.png",
219+
"width": "1081"
220+
},
221+
"created_at": "2012-07-25T21:44:03Z",
222+
"description": {
223+
"entities": {
224+
"hashtags": [],
225+
"links": [],
226+
"mentions": []
227+
},
228+
"html": "<span itemscope=\"https://app.net/schemas/Post\">Just working on something new</span>",
229+
"text": "Just working on something new"
230+
},
231+
"id": "1",
232+
"locale": "en_US",
233+
"name": "Mark Thurman",
234+
"timezone": "America/Los_Angeles",
235+
"type": "human",
236+
"username": "mthurman"
237+
}
238+
]
239+
```
240+
241+
## List users following a user
242+
243+
Returns an array of <a href="/appdotnet/api-spec/blob/master/objects.md#user">User</a> objects for users following the specified user.
244+
245+
### URL
246+
247+
> https://alpha-api.app.net/stream/0/users/[user_id]/followers
248+
249+
### Parameters
250+
251+
None.
252+
253+
### Example
254+
255+
> GET https://alpha-api.app.net/stream/0/users/1/followers
256+
```js
257+
[
258+
{
259+
"app_data": null,
260+
"avatar_image": {
261+
"height": "500",
262+
"url": "https://d2o3sl9fkn83li.cloudfront.net/assets/user/20/00/00/2000000000000000.png",
263+
"width": "500"
264+
},
265+
"counts": {
266+
"followed_by": "0",
267+
"follows": "0",
268+
"posts": "0"
269+
},
270+
"cover_image": {
271+
"height": "686",
272+
"url": "https://d2o3sl9fkn83li.cloudfront.net/assets/user/91/00/00/9100000000000000.png",
273+
"width": "1081"
274+
},
275+
"created_at": "2012-07-25T21:44:03Z",
276+
"description": {
277+
"entities": {
278+
"hashtags": [],
279+
"links": [],
280+
"mentions": []
281+
},
282+
"html": "<span itemscope=\"https://app.net/schemas/Post\">Just working on something new</span>",
283+
"text": "Just working on something new"
284+
},
285+
"id": "1",
286+
"locale": "en_US",
287+
"name": "Mark Thurman",
288+
"timezone": "America/Los_Angeles",
289+
"type": "human",
290+
"username": "mthurman"
291+
}
292+
]
293+
```

0 commit comments

Comments
 (0)