Trifolium.Species.search
You're seeing just the function
search
, go back to Trifolium.Species module for more information.
Link to this function
search(query, opts \\ [])
Specs
search(String.t(), filter: map(), filter_not: map(), order: map(), page: non_neg_integer(), range: map() ) :: Trifolium.API.response()
Similar to Trifolium.Species.all
, but you can pass an additional query
parameter which will full-text search
for it in the available fields. More information can be found on Trefle documentation.
This endpoint IS paginated, using a optional keyword parameter. By default, the page 1 is returned.
You can use a filter
or a not_filter
like so:
iex()> Trifolium.Species.search(query, 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.