Learn R Programming

onemapsgapi (version 1.1.0)

get_theme_info: Get Theme Information

Description

This function is a wrapper for the Get Theme Info API. It returns a named character vector of Theme Name and Query Name.

Usage

get_theme_info(token, theme)

Value

A named character vector of Theme Name and Query Name. If an error occurred, the function returns NULL along with a warning message.

Arguments

token

User's API token. This can be retrieved using get_token

theme

Query name of theme. Themes’ query names can be retrieved using search_themes.

Examples

Run this code
# returns named character vector
if (FALSE) get_theme_status(token, "kindergartens")

# returns NULL, warning message shows status code
if (FALSE) get_theme_status("invalid_token", "blood_bank")

# returns NULL, warning message shows error
if (FALSE) get_theme_status(token, "invalid_theme")

Run the code above in your browser using DataLab