Trifolium.Genus (Trifolium v1.0.0)
Module to be used to interact with Trefle Genus related endpoints.
Link to this section Summary
Functions
List every possible Genus
.
This endpoint IS paginated, using a optional keyword parameter. By default, the page 1 is returned.
Find a specific Genus
according to its id
or slug
.
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
Lists all available Specie
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
Link to this section Functions
all(opts \\ [])
Specs
all(page: non_neg_integer(), filter: %{}, order: %{}) :: Trifolium.API.response()
List every possible Genus
.
This endpoint IS paginated, using a optional keyword parameter. By default, the page 1 is returned.
find(id)
Specs
find(non_neg_integer() | String.t()) :: Trifolium.API.response()
Find a specific Genus
according to its id
or slug
.
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.
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 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.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.