xjformat: Determine if request was sent as XML or JSON

Description Usage Arguments Value See Also Examples

View source: R/xjformat.R

Description

Checks the file heading to identify XML vs JSON content and appends the appropriate class to the object.

Usage

1

Arguments

x

The result from the API call

Value

Returns the result object with additional class attributes

See Also

Other Parsing and Cleaning LegiScan Data: billids; fileLists; fileStructure; getFullText; legiBillHist; legiBillJSON; legiBillMeta; legiBillProg; legiBillSpons; legiBillTxt; legiPersonJSON; legiVotesJSON; legiscanBill; legiscanPerson; legiscanVotes

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Use getURL from RCurl to make the API call
statelist <- getURL(requestURL)

# Determine if statelist object is XML or JSON
statelist <- xjformat(statelist)

## End(Not run)

wbuchanan/legiscanR documentation built on May 4, 2019, 2:01 a.m.