monarch_api: Gets response from monarch API.

View source: R/monarchr.R

monarch_apiR Documentation

Gets response from monarch API.

Description

If a server status error is encoutered, content is set to NULL. Otherwise it is parsed from json to R objects.

Usage

monarch_api(url)

Arguments

url

URL as a string.

Value

A monarch_api S3 class with content as R objects, the url used for the query and the server response.

Examples

url <- "https://api.monarchinitiative.org/api/bioentity/gene/NCBIGene%3A8314?rows=100"
resp <- monarch_api(url)

charlieccarey/monarchr documentation built on Dec. 12, 2023, 12:57 p.m.