Package 'Tejapi'

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

Help Index


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

Tejapi.api_key

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 api_key.

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

Tejapi.api_key

Examples

## Not run: 
Tejapidata = Tejapi.rest(path="datasets/TWN/AIND", http="GET")
plot(Tejapidata[,1])

## End(Not run)