Trifolium.Genus.plants
You're seeing just the function
plants
, go back to Trifolium.Genus module for more information.
Link to this function
plants(id, opts \\ [])
Specs
plants(non_neg_integer() | String.t(), filter: map(), filter_not: map(), order: map(), range: map(), page: non_neg_integer() ) :: Trifolium.API.response()
Lists all available Plant
s for a specific Genus
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.Genus.plants(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.