Get all pages of a paginated call — get_all_pages (original) (raw)
Given a Gemma.R output from a function with offset and limit arguments, returns the output from all pages. All arguments other than offset, limit
get_all_pages(
query,
step_size = 100,
binder = rbind,
directory = NULL,
file = getOption("gemma.file", NA_character_),
overwrite = getOption("gemma.overwrite", FALSE)
)
Arguments
Output from a gemma.R function with offset and limit argument
Size of individual calls to the server. 100 is the maximum value
Binding function for the calls. If raw = FALSE
use rbind
to combine the data.tables. If not, use c
to combine lists
Directory to save the output from the individual calls to. If provided, each page is saved to separate files.
The name of a file to save the results to, or NULL
to not write results to a file. This function always saves the output as an RDS file. Otherwise, it will be a RDS file.
Whether or not to overwrite if a file exists at the specified filename.
Value
A data.table or a list containing data from all pages.