get_api_graph: Get an API graph

View source: R/api_utilities.R

get_api_graphR Documentation

Get an API graph

Description

A wrapper to the get_api_graph method defined in the Credentials class.

Usage

get_api_graph(url, file_ext = ".png", profile = myProfile)

Arguments

url

a character of API URL.

file_ext

a non-empty character vector giving the file extension. Default is .png.

profile

an object of class Credentials. Default is myProfile.

Value

An object of class response.

See Also

Credentials

Examples

## Not run: 
myProfile <- create_profile("", "")
url <- "http://httpbin.org/image/png"

api_data_graph <- get_api_graph(url)

names(api_data_graph)
img <- png::readPNG(api_data_graph$graph)
grid::grid.raster(img)

## End(Not run)

CDCgov/Rnssp documentation built on May 12, 2024, 1:32 a.m.