Check whether the server request returned all the results, i.e. whether the total number of results is smaller or equal to the request limit parameter.

result_completeness(x, silent = FALSE)

Arguments

x

an `httr` response() object produce by an api_operations function.

silent

whether to display warnings (default is `FALSE`)

Value

a boolean indicating whether the set of results obtained is the complete set of results on the server. If the REST request failed (eg: 404 error), the function returns NULL

Examples

result_completeness(api_concepts(term = "pneumonia", limit = 10))
#> Warning: 
#> This server request returned just 10 of a total 823 results.
#> Please increase the server `limit` to fetch all results.
#> [1] FALSE