Sends a query to return all records for your chosen resource. Note that the API returns a maximum of 100 results at a time and this you may need to specify a page or search to get the specific results you want.

query_resource_all(
  resource,
  size = 20,
  page_num = 1,
  search_term,
  search_fields,
  df_only = T
)

Arguments

resource

The name of the resource you would liek to query, as per gtr_endpoints.

size

The number of results you would like to return (max 100).

page_num

The page number of results you would like to see.

search_term

Term you want to check against search_fields. Search works on a 'contains' basis.

search_fields

Fields you want to check search_term against. Enter as character vector. Note fields must be referred to by their code, and some fields may be searched by default. Use get_configs() for details of codes and default search fields.

df_only

Choose whether you only want a dataframe of the 'core' results (T) or you would like additional metadata returned with the query (F).

Value

A dataframe holding the results for your chosen query, or a list holding the dataframe plus corresponding metadata..