Sends a query to return all records for your chosen resource, with the option to query a combination of resources.

get_resources(
  resource,
  output,
  resource_id,
  page_nums,
  size = 20,
  search_term,
  search_fields
)

Arguments

resource

The name of the resource you would like to query/return, as per gtr_endpoints.

output

The name of the resource you would like to return (linked to a specific resource_id), as per gtr_endpoints.

resource_id

The id used to link the resources

page_nums

The numbers of results you would like to see, leaving blank will return all pages bound together. Enter as numeric vector.

size

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

search_term

Term you want to check against search_fields. Search works on a 'contains' basis. Note search_term applies to the resource, NOT the output.

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. Note search_fields relates to the resource, NOT the output.

Value

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