airtable v0.3.1 Airtable.Result.List
Represents a List of items as a struct.
- Contains records as list of type Airtable.Result.Item
- key
offset
is intended to be used for internal reprensentation of pagination (not implemented yet)
Link to this section Summary
Functions
Converts a map (decoded JSON from Airtable, usualle) to a MODULE struct.
Link to this section Functions
Link to this function
from_record_maps(map)
Converts a map (decoded JSON from Airtable, usualle) to a MODULE struct.
Example
iex>Airtable.Result.List.from_record_maps(
...> %{
...> "records" => [
...> %{"id" => "ID1", "fields" => %{"name" => "Fank", "age" => 23} },
...> %{"id" => "ID2", "fields" => %{"name" => "Lara", "age" => 45} },
...> ]
...> }
...>)
%Airtable.Result.List{
offset: nil,
records: [
%Airtable.Result.Item{fields: %{"age" => 23, "name" => "Fank"}, id: "ID1"},
%Airtable.Result.Item{fields: %{"age" => 45, "name" => "Lara"}, id: "ID2"}
]
}