class Anthropic::Internal::Page

def next_page

Returns:
  • (self) -

Raises:
  • (Anthropic::HTTP::Error) -
def next_page
  unless next_page?
    message = "No more pages available. Please check #next_page? before calling ##{__method__}"
    raise RuntimeError.new(message)
  end
  req = Anthropic::Internal::Util.deep_merge(
    @req,
    {query: first_id.nil? ? {after_id: last_id} : {before_id: first_id}}
  )
  @client.request(req)
end