View Source ROR.Matches (ROR v0.1.0)
A structure for storing organization match results from Identify/Affiliation searches
Matches is the equivalent to the ROR.Results
struct when checking for affiliation matches with ROR.identify!/2
This struct supports the Enum
protocol, so you can directly iterate the matches within
Summary
Functions
Returns a chosen Match (a reliably high-rated match) or nil if one has not been found
Returns a chosen Organization (from within a reliably high-rated match) or nil if one has not been found
Extract a Matches struct, containing Match structs and Organizations, from the JSON returned by the ROR affiliation API.
Lists Matches
Returns the total number of matches
Types
@type t() :: %ROR.Matches{items: [ROR.Match.t()], results: integer(), time: integer()}
Functions
@spec chosen(matches :: t()) :: ROR.Match.t() | nil
Returns a chosen Match (a reliably high-rated match) or nil if one has not been found
@spec chosen_organization(matches :: t()) :: nil | ROR.Organization.t()
Returns a chosen Organization (from within a reliably high-rated match) or nil if one has not been found
Extract a Matches struct, containing Match structs and Organizations, from the JSON returned by the ROR affiliation API.
If you are retrieving records via the ROR
module and the REST API you will not need to use this function yourself.
@spec matches(matches :: t()) :: [ROR.Match.t()]
Lists Matches
Returns the total number of matches