build_monarch_url | R Documentation |
The path needs to be safely encoded.
build_monarch_url(path, query = NULL)
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". |
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
URL as a safely encoded string.
URLencode
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.