The path needs to be safely encoded.

build_monarch_url(path, query = NULL)

Arguments

path

A path as a list to the monarch resource to use.

query

A list of url parameter settings. TRUE FALSE set to "true" "false".

Value

URL as a safely encoded string.

Details

But the query apparently will be re-encoded, even if it is already encoded. So it is best not to do any or our own encoding on the query list.

url <- httr::modify_url("https://api.monarchinitiative.org", path = "test query = list(x='this_is:ok', y="but_this_is "https://api.monarchinitiative.org/test

See also

Examples

m_path <- "/api/bioentity/gene" gene <- "NCBIGene%3A8314" url <- build_monarch_url(path = list(m_path, gene), query = list(rows = 100, fetch_objects = "true", format = "json")) url <- build_monarch_url(path = list(m_path, gene), query = list(rows = 100, fetch_objects = TRUE, unselect_evidence=FALSE, format = "json")) url <- build_monarch_url(path = list(m_path, gene), query = list(rows = 100, fetch_objects = TRUE, unselect_evidence=NULL, format = "json"))