Geofox. Ticketing. Tickets
(geofox_ex v0.1.1)
View Source
Functions for ticket listing and management from the Geofox API.
This module provides functions for retrieving available ticket types, their pricing, validity periods, and applicable passenger categories.
Summary
Functions
Get list of available tickets for a station or general use.
Functions
@spec list_tickets( Geofox.Client.t(), keyword() ) :: {:ok, map()} | {:error, term()}
Get list of available tickets for a station or general use.
This function retrieves information about available tickets including pricing, validity periods, passenger types, and regional applicability.
Parameters
client- The Geofox clientopts- Optional parameters
Options
:language- Language code (default: "de"):version- API version (default: 1):filter_type- Filter type (default: "NO_FILTER"):station_key- Station identifier to get station-specific tickets
Examples
# Get all available tickets
{:ok, tickets} = Geofox.Ticketing.Tickets.list_tickets(client)
# Get tickets available at a specific station
{:ok, tickets} = Geofox.Ticketing.Tickets.list_tickets(client,
station_key: "Master:1"
)Returns
The response includes:
ticketInfos- List of ticket information with:- Tariff kind and level details
- Valid regions and zones
- Person type applicability (adult, child, student, etc.)
- Validity periods and time restrictions
- Available variants with pricing
- Required start station information