Skip to contents

legis_get_bodies() lists actions and legis_get_body() gets a single body by ID.

Usage

legis_get_bodies(
  ...,
  client = getOption("legistarapi.client"),
  simplifyVector = TRUE,
  error_call = caller_env()
)

legis_get_body(
  body_id,
  ...,
  client = getOption("legistarapi.client"),
  simplifyVector = TRUE,
  error_call = caller_env()
)

Arguments

...

Arguments passed on to legistar

top,skip,select,filter,orderby

Passed to internal req_odata_query() function.

direction

Default NULL. Use "asc" for ascending or "desc" for descending sort order based on orderby argument. Ignored if orderby is not supplied.

count,inlinecount

Currently unsupported.

n_max

Maximum number of records to return. Currently unsupported.

.multi

Controls what happens when an element of ... is a vector containing multiple values:

  • "error", the default, throws an error.

  • "comma", separates values with a ,, e.g. ?x=1,2.

  • "pipe", separates values with a |, e.g. ?x=1|2.

  • "explode", turns each element into its own parameter, e.g. ?x=1&x=2.

If none of these functions work, you can alternatively supply a function that takes a character vector and returns a string.

client

String with Legistar client name. Defaults to getOption("legistarapi.client").

simplifyVector

Should JSON arrays containing only primitives (i.e. booleans, numbers, and strings) be caused to atomic vectors?

error_call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

body_id

Body ID. Required for legis_get_body().