Trifolium.Distributions.species
You're seeing just the function
species
, go back to Trifolium.Distributions module for more information.
Link to this function
species(id, opts \\ [])
Specs
species(non_neg_integer() | String.t(), filter: map(), filter_not: map(), order: map(), range: map(), page: non_neg_integer() ) :: Trifolium.API.response()
Lists all available Specie
s for a specific Distribution
according to its id
or slug
.
You can paginate this endpoint, and also filter it, as explained on Trefle documentation.
You can use a filter
or a not_filter
like so:
iex()> Trifolium.Distributions.species(id, filter: %{year: year})
The same applies to the order
and range
parameters, where you just need to pass a map to it,
that it will be correctly parsed to the query parameter.