Lookup bills on OpenStates.

Share:

Description

Lookup bills on OpenStates.

Usage

1
2
3
os_billlookup(state = NULL, session = NULL, bill_id = NULL,
  fields = NULL, per_page = NULL, page = NULL, as = "table",
  key = NULL, ...)

Arguments

state

state two-letter abbreviation (character), required

session

session of congress (integer), e.g., 2009-2010 = 20092010, required

bill_id

One or more identification numbers of bills (character), required

fields

You can request specific fields by supplying a vector of fields names. Many fields are not returned unless requested. If you don't supply a fields parameter, you will get the most commonly used subset of fields only. To save on bandwidth, parsing time, and confusion, it's recommended to always specify which fields you will be using.

per_page

Number of records to return. Default: 20. Max: 50.

page

Page to return. Default: 1. You can use this in combination with the per_page parameter to get more than the default or max number of results per page.

as

(character) One of table (default), list, or response (httr response object)

key

your SunlightLabs API key; loads from .Rprofile

...

Curl options passed on to GET

Value

List of output fields.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
os_billlookup(state='ca', session=20092010, bill_id='AB 667')
os_billlookup(state='ca', session=20092010, bill_id='AB 667', per_page=1)
os_billlookup(state='ca', session=20092010, bill_id='AB 667', per_page=1, fields='id')
os_billlookup(state='ca', session=20092010, bill_id='AB 667',
   per_page=3, fields=c('id','title'))
os_billlookup(state='ca', session=20092010, bill_id='SB 425')
os_billlookup(state='ca', session=20092010, bill_id=c('AB 667','SB 425'))

library('httr')
os_billlookup(state='ca', session=20092010, bill_id='AB 667', config=verbose(), per_page=1)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.