Support pagination params in following/followers Mastodon API endpoints
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
a4c0ef824c
commit
0b67adc5cb
1 changed files with 20 additions and 0 deletions
|
|
@ -405,6 +405,16 @@ export default class Misskey implements MegalodonInterface {
|
|||
limit: options.limit
|
||||
})
|
||||
}
|
||||
if (options.max_id) {
|
||||
params = Object.assign(params, {
|
||||
untilId: options.max_id
|
||||
})
|
||||
}
|
||||
if (options.since_id) {
|
||||
params = Object.assign(params, {
|
||||
sinceId: options.since_id
|
||||
})
|
||||
}
|
||||
}
|
||||
return this.client.post<Array<MisskeyAPI.Entity.Follower>>('/api/users/followers', params).then(res => {
|
||||
return Object.assign(res, {
|
||||
|
|
@ -433,6 +443,16 @@ export default class Misskey implements MegalodonInterface {
|
|||
limit: options.limit
|
||||
})
|
||||
}
|
||||
if (options.max_id) {
|
||||
params = Object.assign(params, {
|
||||
untilId: options.max_id
|
||||
})
|
||||
}
|
||||
if (options.since_id) {
|
||||
params = Object.assign(params, {
|
||||
sinceId: options.since_id
|
||||
})
|
||||
}
|
||||
}
|
||||
return this.client.post<Array<MisskeyAPI.Entity.Following>>('/api/users/following', params).then(res => {
|
||||
return Object.assign(res, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue