kylej1994 / graffiti

2 stars 0 forks source link

Stop Returning ALL Posts to FE #220

Closed ronovan closed 7 years ago

ronovan commented 7 years ago

Have some PAGE_AMOUNT = 20 static number that denotes how many pages are returned to the FE on each call to Get Posts

Two new endpoints:

  1. GET /post?longitude=[long]&latitude=[lat]&page=[page] If the FE requests the 4th page of posts, that means us returning to posts 61-80 (sorted by time), assuming that PAGE_AMOUNT = 20 and not some other number.
  2. GET /post?longitude=[long]&latitude=[lat]&time_since=[time] Return up to PAGE_AMOUNT of of most recent posts that have been posted since time_since
ronovan commented 7 years ago

fixed with pagination in PR #236

see wiki for updated endpoints