Title: | API Wrapper for Taiwan Economic Journal Data Service |
---|---|
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>. |
Authors: | Peter Young [aut, cre] |
Maintainer: | Peter Young <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.1 |
Built: | 2024-10-21 03:31:13 UTC |
Source: | https://github.com/cran/Tejapi |
Retrieves Data from the Tejapi Datatable endpoint
Tejapi(datatable_code, paginate = FALSE, ...)
Tejapi(datatable_code, paginate = FALSE, ...)
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. |
Set your api_key
with Tejapi.api_key
function. For instructions on finding your api key go to https://api.tej.com.tw
Returns a data.frame.
## Not run: Tejapi.datatable('TWN/AIND', paginate=TRUE) ## End(Not run)
## Not run: Tejapi.datatable('TWN/AIND', paginate=TRUE) ## End(Not run)
Query or set Tejapi API key
Tejapi.api_key(api_key)
Tejapi.api_key(api_key)
api_key |
Optionally passed parameter to set Tejapi |
Returns invisibly the currently set api_key
.
## Not run: Tejapi.api_key('foobar') ## End(Not run)
## Not run: Tejapi.api_key('foobar') ## End(Not run)
Executes Tejapi API calls
Tejapi.rest(path, http = c("GET", "PUT", "POST", "DELETE"), postdata = NULL, ...)
Tejapi.rest(path, http = c("GET", "PUT", "POST", "DELETE"), postdata = NULL, ...)
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. |
Set your api_key
with Tejapi.api_key
function. For instructions on finding your api key go to https://api.tej.com.tw
Tejapi API response.
## Not run: Tejapidata = Tejapi.rest(path="datasets/TWN/AIND", http="GET") plot(Tejapidata[,1]) ## End(Not run)
## Not run: Tejapidata = Tejapi.rest(path="datasets/TWN/AIND", http="GET") plot(Tejapidata[,1]) ## End(Not run)