fetcher v0.4.0 Fetcher.Map View Source
Fetcher implementation for the map type
Link to this section Summary
Functions
Extracts data from a map. It returns a tuple with {:ok, params} if every requested key is present, and {:error, “the parameter ‘…’ is missing”} for the first key not found
Link to this section Types
Link to this section Functions
Link to this function
fetch(source, keys, options)
View Source
fetch(map(), [any()], Fetcher.options()) :: result()
Extracts data from a map. It returns a tuple with {:ok, params} if every requested key is present, and {:error, “the parameter ‘…’ is missing”} for the first key not found.
if all
is true the function returns either {:ok, params}, or {:error, [error]} with all the keys that
couldn’t be found.