View Source ROR.ID (ROR v0.1.0)
Functions for extracting and using Admin data from a ROR Organization record
IDs are simply a string
Summary
Functions
Extracts an ID string from the decoded JSON of a ROR Organization record
Takes any variant of the ROR ID and returns only the record ID fragment
Takes any ID variant and returns a full ID
Return a URL path for the ID
Returns true if the ID is valid, false otherwise
Functions
Extracts an ID string from the decoded JSON of a ROR Organization record
If you are retrieving records via the ROR
module and the REST API you will not need to use this function yourself.
Example
iex> record = File.read!("test/support/static/example_org.json") |> Jason.decode!()
...> ROR.ID.extract(record)
"https://ror.org/00pjdza24"
Takes any variant of the ROR ID and returns only the record ID fragment
iex> ID.minimize("https://ror.org/00pjdza24")
"00pjdza24"
Takes any ID variant and returns a full ID
iex> ID.normalize("00pjdza24")
"https://ror.org/00pjdza24"
Return a URL path for the ID
iex> ID.minimize("https://ror.org/00pjdza24")
"/00pjdza24"
Returns true if the ID is valid, false otherwise
iex> ID.valid?("https://ror.org/00pjdza24")
true