Title: | API Wrapper for Taiwan Economic Journal Data Service |
Version: | 1.0.1 |
Date: | 2018-10-23 |
Author: | Peter Young [aut, cre] |
Maintainer: | Peter Young <peter_young@tej.com.tw> |
Description: | Functions for interacting directly with the Taiwan Economic Journal API to offer data in R. For more information go to https://api.tej.com.tw. |
Imports: | httr (≥ 0.6.1), jsonlite (≥ 0.9.14) |
Suggests: | roxygen2 |
Depends: | R (≥ 2.15.0) |
License: | MIT + file LICENSE |
URL: | https://api.tej.com.tw |
BugReports: | https://api.tej.com.tw |
RoxygenNote: | 6.1.0 |
NeedsCompilation: | no |
Packaged: | 2018-11-01 00:17:52 UTC; YDS |
Repository: | CRAN |
Date/Publication: | 2018-11-04 16:20:03 UTC |
Retrieves Data from the Tejapi Datatable endpoint
Description
Retrieves Data from the Tejapi Datatable endpoint
Usage
Tejapi(datatable_code, paginate = FALSE, ...)
Arguments
datatable_code |
Datatable code on Tejapi specified as a string. |
paginate |
When set to TRUE, fetches up to 1,000,000 rows of data |
... |
Additional named values that are interpreted as Tejapi API parameters. |
Details
Set your api_key
with Tejapi.api_key
function. For instructions on finding your api key go to https://api.tej.com.tw
Value
Returns a data.frame.
See Also
Examples
## Not run:
Tejapi.datatable('TWN/AIND', paginate=TRUE)
## End(Not run)
Query or set Tejapi API key
Description
Query or set Tejapi API key
Usage
Tejapi.api_key(api_key)
Arguments
api_key |
Optionally passed parameter to set Tejapi |
Value
Returns invisibly the currently set api_key
.
Examples
## Not run:
Tejapi.api_key('foobar')
## End(Not run)
Executes Tejapi API calls
Description
Executes Tejapi API calls
Usage
Tejapi.rest(path, http = c("GET", "PUT", "POST", "DELETE"),
postdata = NULL, ...)
Arguments
path |
Path to api resource. |
http |
Type of http request sent. |
postdata |
A character or raw vector that is sent in a body. |
... |
Named values that are interpretted as Tejapi API parameters. Please see https://api.tej.com.tw/documents.html. |
Details
Set your api_key
with Tejapi.api_key
function. For instructions on finding your api key go to https://api.tej.com.tw
Value
Tejapi API response.
See Also
Examples
## Not run:
Tejapidata = Tejapi.rest(path="datasets/TWN/AIND", http="GET")
plot(Tejapidata[,1])
## End(Not run)