Description Usage Arguments Value Slots Note Examples
Defines a LegiScan class object which is passed to methods to submit/retrieve data from calls to the LegiScan API and for parsing data retrieve from the LegiScan API
LegiScan constructor function
LegiScan default construction method
1 2 3 4 | legiscanR(...)
## S4 method for signature 'LegiScan'
initialize(.Object, urlBase, api, format)
|
... |
Should be passed arguments named by the slot names from getSlots("LegiScan") |
.Object |
a LegiScan object to create |
urlBase |
Root URL for LegiScan API calls |
api |
If specified, will search for matching file otherwise will treat as character string |
format |
XML or JSON API requests (set on the LegiScan website) |
Returns the LegiScan object if the validation tests are passed
urlBase
The base for the request URL (predefined in the class prototype)
api
The API key for the end user
format
Specifies if you have requested your API pulls in XML or JSON
The default behavior for the class constructor is to read the API key from ~/.legiscanAPI. Accessor methods are available to get/set the values of the LegiScan object.
The file format returned by the LegiScan API is set up when logging into your LegiScan account. The value provided by the class object is used to select the appropriate parsing methods based on the object returned from the API call
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.