Skip to content

Commit

Permalink
fix: add back support for next min id
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasklaassen committed May 17, 2019
1 parent 99049c4 commit a3b2d95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/feeds/media-comments.feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ export class MediaCommentsFeed extends Feed<MediaCommentsFeedResponse, MediaComm
id: string;
@Expose()
private nextMaxId: string;
@Expose()
private nextMinId: string;

set state(body: MediaCommentsFeedResponse) {
this.moreAvailable = !!body.next_max_id;
this.nextMaxId = body.next_max_id;
this.nextMinId = body.next_min_id;
}

async request() {
Expand All @@ -18,6 +21,7 @@ export class MediaCommentsFeed extends Feed<MediaCommentsFeedResponse, MediaComm
qs: {
can_support_threading: true,
max_id: this.nextMaxId,
min_id: this.nextMinId,
},
});
this.state = body;
Expand Down
1 change: 1 addition & 0 deletions src/responses/media-comments.feed.response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface MediaCommentsFeedResponse {
preview_comments: MediaCommentsFeedResponsePreviewCommentsItem[];
can_view_more_preview_comments: boolean;
next_max_id: string;
next_min_id: string;
status: string;
}
export interface MediaCommentsFeedResponseCommentsItem {
Expand Down

0 comments on commit a3b2d95

Please sign in to comment.