Latest posts API pagination

Question about using the API (which I’m doing through the discourse_api gem, cool!) - it’s related to pagination (I would also want to use the latest posts endpoint) but for my current example below I’ll provide something from users, since I started working on it first.

I am wanting to get all activity for a user (topics and replies is good) so I’m trying this:

vsoch = client.user_topics_and_replies("vsoch")

And then I consistently get a list of 30, regardless if the user obviously has more. I tried editing the source code to add a page variable:

# frozen_string_literal: true
module DiscourseApi
  module API
    module UserActions
      def user_replies(username, page=1)
        params = { "username": username, "filter": '5', page: page }
        response = get("/user_actions.json", params)
        response.body["user_actions"]
      end

      def user_topics_and_replies(username, page=1)
        params = { "username": username, "filter": "4,5", page: page }
        response = get("/user_actions.json", params)
        response.body["user_actions"]
      end
    end
  end
end

but it doesn’t seem to do anything - it’s always the same list of 30 regardless of the page number. Is it possible to get more than 30? Am I trying the wrong thing? Any help would be greatly appreciated - if I can figure out how to do it I’d very happily put in a PR so others can too :slight_smile: