Are you trying to get all the posts that belong to a topic?
This would be a good feature to add to the discourse_api ruby gem rather than making raw api calls. There is no “Next Page” api call. What you will need to do to get the “next page” is to look at the post_stream part of the response:
I wrote a little script that you can pass a category or a topic and it’ll download all of the posts. It was a little finicky getting all of the posts, as it seemed that the payload (sometimes?) includes posts before the first on requested.
Sounds like a good idea. It might need to be limited to admins or something to protect from DDS attacks?
I’m using a topic to hold a change-log which is all the commits as they come in each day from our GitHub project. I want to find the post that contains a particular commit hash. So, I’d want to search all the posts for that topic in reverse date order to find the post.
I thought it might be too expensive to search on the hash itself and extract that post that is in the topic.
And I’ve cooked up something that works for me. It grabs the post_stream and then searches on the last 10 posts for the topic looking for my commit hash.