| rmangal_request | R Documentation |
These functions send a request to a specified endpoint of the Mangal API.
rmangal_request(endpoint, query = NULL, limit = 100, cache = FALSE, ...)
rmangal_request_singleton(endpoint, id, cache = FALSE, ...)
endpoint |
A character string specifying the API endpoint to query.
Must be one of the endpoints listed in |
query |
Either a character string for a keyword search, or a named list
for custom queries. If |
limit |
An integer specifying the maximum number of results per page. Default is 100. |
cache |
Logical or character. If |
... |
Additional arguments (currently ignored). |
id |
An integer or character specifying the unique identifier of the resource to retrieve. Must be a single value. |
An object of class mgGetResponses containing the response body
and the raw HTTP response(s).
An object of class mgGetResponses containing the response body
and the raw HTTP response.
rmangal_request(): Send a request to a specified endpoint of the
Mangal API and returns all matching results.
rmangal_request_singleton(): Retrieves a single resource by its ID from a
specified endpoint of the Mangal API.
# Search for networks with keyword "insect"
result <- rmangal_request("network", query = "insect", limit = 10)
# Custom query for a specific dataset
result <- rmangal_request("network", query = list(dataset_id = 19))
# Retrieve network with ID 5013
result <- rmangal_request_singleton("network", id = 5013)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.