Skip to content

Commit 994ad08

Browse files
committed
user_following: added pagination
1 parent 2c0f14c commit 994ad08

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

src/paths/user_following.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ get:
66
Returns a list of users (`user_ids`) that the given user is following.
77
88
9-
Use the `count` query parameter (_optional_) to limit the number of results. (count <= 1500)
9+
- Upto 500 results per request.
10+
11+
- To fetch additional results, use "next" query parameter provided in the previous response.
1012
1113
1214
**Note:** This list does not contain the `publication_ids` of the publications that the user is following. To get those, please use _Get User Publication Following_ endpoint (`/user/{user_id}/publication_following`).
@@ -20,13 +22,22 @@ get:
2022
type: string
2123
example: 14d5c41e0264
2224

23-
- name: count
25+
- name: next
2426
in: query
2527
required: false
26-
description: To limit the number of results. (count < 1500)
28+
description: >
29+
- The `next` parameter is used to paginate through the results.
30+
31+
- It should be set to the value of the `next` field from the previous response.
32+
33+
- If you want to get the first page, you can set it to an empty string.
34+
35+
- The `next` parameter is optional.
36+
37+
- If you don't provide it, the API will return the first page of results.
2738
schema:
28-
type: int
29-
example: 10
39+
type: string
40+
example: ""
3041

3142
responses:
3243
'200':
@@ -57,3 +68,17 @@ get:
5768
- "cfa71f272740"
5869
- "4a142a63b9a0"
5970
- "78561519e424"
71+
72+
count:
73+
type: integer
74+
format: int32
75+
description: Number of user accounts that the given user is following.
76+
example: 10
77+
78+
next:
79+
type: string
80+
description: >
81+
- This attribute can be used in your next request to get the next page of results.
82+
83+
- If there are no more results, this attribute will be an empty string.
84+
example: "1485886216373"

0 commit comments

Comments
 (0)