vista_client v0.1.2 VistaClient.Session

Struct to represent an Session.

Definition Sessions

A scrrening show of a film in a cinema on a screen at a certain time. This is what people book tickets for.

JSON example:

{
  "ID": "1001-14164",
  "CinemaId": "1001",
  "ScheduledFilmId": "HO00000720",
  "SessionId": "14164",
  "AreaCategoryCodes": [],
  "Showtime": "2019-02-26T20:00:00",
  "IsAllocatedSeating": false,
  "AllowChildAdmits": true,
  "SeatsAvailable": 66,
  "AllowComplimentaryTickets": true,
  "EventId": "",
  "PriceGroupCode": "0033",
  "ScreenName": "Kino 2",
  "ScreenNameAlt": "433402",
  "ScreenNumber": 2,
  "CinemaOperatorCode": "1001",
  "FormatCode": "0000000001",
  "FormatHOPK": "0000000001",
  "SalesChannels": ";CALL;RSP;GSALE;CELL;KIOSK;PDA;WWW;POSBK;POS;IVR;",
  "SessionAttributesNames": ["OV"],
  "ConceptAttributesNames": [],
  "AllowTicketSales": true,
  "HasDynamicallyPricedTicketsAvailable": false,
  "PlayThroughId": null,
  "SessionBusinessDate": "2019-02-26T00:00:00",
  "SessionDisplayPriority": 0,
  "GroupSessionsByAttribute": false,
  "SoldoutStatus": 0,
  "TypeCode": "N"
}

Link to this section Summary

Link to this section Functions

Link to this function

from_map_list(sessions, opts \\ [ignore_errors: false])

Link to this function

handle_validity(structs, filtered, arg3)

Link to this function

showing_in(session)

showing_in(%VistaClient.Session{
  attributes: term(),
  cinema: term(),
  cinema_id: term(),
  date: term(),
  film: term(),
  film_id_string: term(),
  id_string: term(),
  screen_name: term(),
  seats_available: term(),
  showtime: term(),
  version: term()
}) :: integer()

Takes a session and returns the seconds until the screening starts.

  • Can be negative (session already started or has run
  • Depends on erlang.localtime to be correct

#FIXME: Abandon Naive DateTime

Let's abandon localtimes and naive datettimes and just use UTC passing DateTime structs around.