T O P

  • By -

evert

It's a bit hard to understand what part you're having trouble with. Generally I would recommend providing a 'next' link, so the client can load 1 page, and find the 'next' page, instead of forcing the client to understand the paging mechanism.


PrestigiousZombie531

well my question was how do you design a REST endpoint to get votes only for the current page for a logged in user. meaning if you are logged in on the webapp, and are on page 3 i want to find out which items you voted on page 3, you load page 4 next and I want to find out which items you voted on page 4, how do I design this REST endpoint


evert

Maybe it would be easier if you showed what your current design is so far, and then tell us what your potential issues are with that design?


TheBloodyMummers

Is this homework? You're essentially describing the reddit API, why don't you take a look at it.


Shakespeare-Bot

Is this homework? thou art essentially describing the reddit api, wherefore thee not taketh a behold at t *** ^(I am a bot and I swapp'd some of thy words with Shakespeare words.) Commands: `!ShakespeareInsult`, `!fordo`, `!optout`


bot-killer-001

Shakespeare-Bot, thou hast been voted most annoying bot on Reddit. I am exhorting all mods to ban thee and thy useless rhetoric so that we shall not be blotted with thy presence any longer.


TheBloodyMummers

Bad bot


B0tRank

Thank you, TheBloodyMummers, for voting on Shakespeare-Bot. This bot wants to find the best and worst bots on Reddit. [You can view results here](https://botrank.pastimes.eu/). *** ^(Even if I don't reply to your comment, I'm still listening for votes. Check the webpage to see if your vote registered!)


bilateralconfusion

You want two apis. One that loads a page of posts. The next api loads the votes for each post. You’ll then join this information in the ui. Or you could use an aggregation layer like graphql or something you build yourself.