After discussions with @cha0sg0d and joel from nerman, realized we need our public /posts/ API to serve posts+replies. This PR adds that and refactors the query logic in selectAndCleanPosts a bit
Closes #208
The new API is as follows:
Users can submit a timestamp for startTime AND OR endTime. If startTime exists, we get posts after or equal to that time. If endTime exists, we get posts before or equal to that time. If rootOnly is true, we only get root posts. By default, we get all post and replies.
Example:
HTTP GET https://nouns.nymz.xyz/api/v1/posts?startTime=1687412894&endTime=1687474267293
After discussions with @cha0sg0d and joel from nerman, realized we need our public /posts/ API to serve posts+replies. This PR adds that and refactors the query logic in
selectAndCleanPosts
a bitCloses #208
The new API is as follows:
rootOnly
is true, we only get root posts. By default, we get all post and replies.Example:
HTTP GET
https://nouns.nymz.xyz/api/v1/posts?startTime=1687412894&endTime=1687474267293