vista_client v0.1.1 VistaClient
Documentation for VistaClient.
Examples
iex> {:ok, cinemas} = VistaClient.get_cinemas()
iex> cinemas |> Enum.find(fn cinema -> cinema.id == 1001 end)
%VistaClient.Cinema{id: 1001, name: "Delphi Lux"}
Link to this section Summary
Functions
Callback implementation for VistaClient.Behaviour.get_cinemas/0
.
Callback implementation for VistaClient.Behaviour.get_scheduled_films/0
.
Callback implementation for VistaClient.Behaviour.get_session_availabilty/1
.
Callback implementation for VistaClient.Behaviour.get_sessions/0
.
creates auth and content-type and accept headers
Returns
Link to this section Types
Link to this section Functions
Link to this function
get(what, opts \\ [])
Link to this function
get_cinemas()
Callback implementation for VistaClient.Behaviour.get_cinemas/0
.
Link to this function
get_endpoints()
Link to this function
get_scheduled_films()
Callback implementation for VistaClient.Behaviour.get_scheduled_films/0
.
Link to this function
get_session_availabilty(session_id)
Callback implementation for VistaClient.Behaviour.get_session_availabilty/1
.
Link to this function
get_sessions()
Callback implementation for VistaClient.Behaviour.get_sessions/0
.
Link to this function
make_basic_headers()
creates auth and content-type and accept headers
Link to this function
make_request(url)
Link to this function
make_structs(endpoints, atom)
Link to this function
make_url_for(atom, api_url)
Link to this function
make_url_for(what, api_url, list)
Returns
- {:ok, true} if VISTA server seems up
- {:ok, false} if not
- {:error, reason} on config error
EXAMPLES
iex> VistaClient.online?()
{:ok, true}
Link to this function
url_for(what, opts \\ [])
url_for(retrieved_entity(), keyword()) :: {:ok, url()} | {:error, reason()}