Login
Mangal relies on ORCID for authentication and login. As long as you have an ORCID profile, you can login.
Mangal.login
— Functionlogin(token::AbstractString)
This function will store the token in the MANGAL_BEARER_TOKEN
environmental variable. To get the your token, please use login
with no argument.
login()
Read the bearer token from the MANGAL_BEARER_TOKEN
environment variable. If not found, displays a login message with a login URL. Currently, being logged in is only necessary to access private datasets.
Formatters
Missing docstring for Mangal.format_mangal_response
. Check Documenter's build log for details.
Mangal.format_mangal_coordinates
— Functionformat_mangal_coordinates(d::Dict{T,Any}) where {T <: AbstractString}
Returns a set of coordinates in a GeoInterface
object, which can be a Point
or a Polygon
.
Other functions
Mangal.generate_base_header
— Functiongenerate_base_header()
If a bearer token is present, this function will add it to the header.
Mangal.generate_request_query
— Functiongenerate_request_query(parameters::Pair...)
Takes a series of Pairs
, and returns an URL-ready query string.
Mangal.search_objects_by_query
— Functionsearch_objects_by_query(endpoint::AbstractString, formatter::Function, query::Pair...)
In all cases, it is assumed that the functions will be wrapepd in calls to query objects until no further objects are found.
Caching
Mangal.cache
— Functioncache(results::Vector{T}) where {T <: Union{MangalReferenceTaxon,MangalNode,MangalNetwork}}
Internally, the Mangal
package uses a cache to store some objects that are likely to be queried more than once. These are MangalNode
and MangalReferenceTaxon
, which are called in a nested way during the querying of e.g. Interactions
. This is not a fancy mechanism, and it only works when calling the nodes or backbones by their id
(which is what the resources-hungry functions do internally anyways).
Full data retrieval
Missing docstring for Mangal.get_all_nodes
. Check Documenter's build log for details.
Missing docstring for Mangal.get_all_interactions
. Check Documenter's build log for details.