Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add pagination to base GET comments endpoint #151

Unanswered
kwiat1990 asked this question in Q&A
Discussion options

Hi, I struggle recently with pagination for my comments. To retrieve comments I use the base GET endpoint, which doesn't include pagination but I think the alternative - the flat endpoint - a little bit cumbersome as it requires more work to group all comments by thread and then to paginate every comments from that thread.

At the first sight the current implementation can cause problems as comments are sorted by ID, so if I want to retrieve first 25 of them, I can't be sure that I get a comment and all its thread-comments.

You must be logged in to vote

Replies: 1 comment

Comment options

Hey, I work currently on pagination of comments. In my case I have one level of nesting and according to docs and this thread: #106 only flat GET endpoint allows both operations. At the first sight, it produces much overhead during processing of entities but nonetheless I've tried to achieve what I previously had using hierarchical GET endpoint. Sadly, I can't really think of a way to fetch needed comments, group comments and its thread and know the exact number of comments in a thread. With flat structure all comments are pretty standalone and some pieces of information, which could help in grouping, are missing.

Have anyone tried something like this?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /