Skip to contents

Fetches all pages of results from a paginated API endpoint by making multiple requests and combining the results.

Usage

get_all_pages(initial_response, request_fn, max_pages = NULL)

Arguments

initial_response

The first response object from the API call

request_fn

A function that takes page number as argument and returns API response

max_pages

Maximum number of pages to retrieve (optional)

Value

A combined tibble with all pages of results