fyyd_ex v0.1.2 Fyyd.Utils View Source
Stuff that hasn’t found it’s place yet.
Link to this section Summary
Functions
Takes a Map, where the keys are Strings, and a List of expected fields. Returns Keyword List, where the keys are atoms
Takes a Keyword List, where the keys are atoms, and a Module name and returns a struct built from them
Link to this section Functions
Takes a Map, where the keys are Strings, and a List of expected fields. Returns Keyword List, where the keys are atoms.
Example
iex> Fyyd.Utils.extract_from_response(%{"foo" => "bar"}, ["foo"])
[foo: "bar"]
Takes a Keyword List, where the keys are atoms, and a Module name and returns a struct built from them.