Geofox.Types (geofox_ex v0.1.0)

View Source

Type definitions for Geofox API structures based on the OpenAPI specification.

Summary

Types

announcement()

@type announcement() :: %{
  id: String.t() | nil,
  version: integer() | nil,
  summary: String.t() | nil,
  locations: [location()] | nil,
  description: String.t(),
  links: [link()] | nil,
  publication: time_range(),
  validities: [time_range()],
  lastModified: String.t(),
  planned: boolean() | nil,
  reason: String.t() | nil,
  broadcastRelevant: boolean() | nil
}

attribute()

@type attribute() :: %{
  title: String.t() | nil,
  isPlanned: boolean() | nil,
  value: String.t(),
  types: [String.t()] | nil,
  id: String.t() | nil
}

bounding_box()

@type bounding_box() :: %{lowerLeft: coordinate(), upperRight: coordinate()}

button_type()

@type button_type() :: :BRAILLE | :ACUSTIC | :COMBI | :UNKNOWN

cont_search_by_service_id()

@type cont_search_by_service_id() :: %{
  serviceId: integer(),
  lineKey: String.t(),
  plannedDepArrTime: gti_time(),
  additionalOffset: integer() | nil
}

coordinate()

@type coordinate() :: %{x: number(), y: number(), type: String.t()}

coordinate_type()

@type coordinate_type() :: String.t()

course_element()

@type course_element() :: %{
  fromStation: sd_name(),
  fromPlatform: String.t() | nil,
  fromRealtimePlatform: String.t() | nil,
  toStation: sd_name(),
  toPlatform: String.t() | nil,
  toRealtimePlatform: String.t() | nil,
  model: String.t() | nil,
  depTime: String.t(),
  arrTime: String.t(),
  depDelay: integer() | nil,
  arrDelay: integer() | nil,
  fromExtra: boolean(),
  fromCancelled: boolean(),
  toExtra: boolean(),
  toCancelled: boolean(),
  attributes: [attribute()] | nil,
  path: path() | nil
}

day_type()

@type day_type() :: :WEEKDAY | :WEEKEND

departure()

@type departure() :: %{
  line: service(),
  directionId: integer() | nil,
  timeOffset: integer() | nil,
  delay: integer() | nil,
  extra: boolean(),
  cancelled: boolean(),
  serviceId: integer() | nil,
  station: sd_name() | nil,
  stopPoint: sd_name() | nil,
  platform: String.t() | nil,
  realtimePlatform: String.t() | nil,
  vehicles: [vehicle()] | nil,
  attributes: [attribute()] | nil
}

discount_type()

@type discount_type() :: :NONE | :ONLINE | :SOCIAL

dl_filter_entry()

@type dl_filter_entry() :: %{
  serviceID: String.t() | nil,
  stationIDs: [String.t()] | nil,
  label: String.t() | nil,
  serviceName: String.t() | nil
}

elevator()

@type elevator() :: %{
  lines: [String.t()] | nil,
  label: String.t() | nil,
  cabinWidth: integer() | nil,
  cabinLength: integer() | nil,
  doorWidth: integer() | nil,
  description: String.t() | nil,
  elevatorType: String.t() | nil,
  buttonType: button_type() | nil,
  state: elevator_state() | nil,
  cause: String.t() | nil
}

elevator_state()

@type elevator_state() :: :READY | :OUTOFORDER | :UNKNOWN

extra_fare_type()

@type extra_fare_type() :: :NO | :POSSIBLE | :REQUIRED

filter_planned()

@type filter_planned() :: :NO_FILTER | :ONLY_PLANNED | :ONLY_UNPLANNED

filter_type()

@type filter_type() :: :NO_FILTER | :HVV_LISTED

gti_time()

@type gti_time() :: %{date: String.t(), time: String.t()}

individual_route()

@type individual_route() :: %{
  start: sd_name(),
  dest: sd_name(),
  path: path() | nil,
  paths: [path()] | nil,
  length: integer() | nil,
  time: integer() | nil,
  serviceType: service_type()
}

individual_track()

@type individual_track() :: %{
  time: integer(),
  length: integer(),
  type: service_type()
}

journey()

@type journey() :: %{
  journeyID: String.t(),
  line: service(),
  vehicleType: vehicle_type(),
  realtime: boolean() | nil,
  segments: [path_segment()] | nil
}

journey_sd_name()

@type journey_sd_name() :: %{
  name: String.t() | nil,
  city: String.t() | nil,
  combinedName: String.t() | nil,
  id: String.t(),
  globalId: String.t() | nil,
  provider: String.t() | nil,
  type: location_type(),
  coordinate: coordinate() | nil,
  layer: integer() | nil,
  tariffDetails: tariff_details() | nil,
  serviceTypes: [String.t()] | nil,
  hasStationInformation: boolean() | nil,
  address: String.t() | nil,
  arrTime: gti_time() | nil,
  depTime: gti_time() | nil,
  arrDelay: integer() | nil,
  depDelay: integer() | nil,
  extra: boolean(),
  cancelled: boolean(),
  attributes: [attribute()] | nil,
  platform: String.t() | nil,
  realtimePlatform: String.t() | nil
}

line_list_entry()

@type line_list_entry() :: %{
  id: String.t(),
  name: String.t() | nil,
  carrierNameShort: String.t() | nil,
  carrierNameLong: String.t() | nil,
  sublines: [subline_list_entry()] | nil,
  exists: boolean(),
  type: service_type_info()
}

link()

@type link() :: %{label: String.t(), url: String.t()}

location()

@type location() :: %{
  type: String.t(),
  name: String.t() | nil,
  line: service() | nil,
  begin: sd_name() | nil,
  end: sd_name() | nil,
  bothDirections: boolean()
}

location_type()

@type location_type() ::
  :UNKNOWN
  | :STATION
  | :ADDRESS
  | :POI
  | :COORDINATE
  | :BIKE_AND_RIDE
  | :STOP_POINT

map_entry()

@type map_entry() :: %{key: String.t(), value: String.t()}

modification_type()

@type modification_type() :: :MAIN | :POSITION | :SEQUENCE

partial_station()

@type partial_station() :: %{
  lines: [String.t()] | nil,
  stationOutline: String.t() | nil,
  elevators: [elevator()] | nil
}

path()

@type path() :: %{
  track: [coordinate()],
  attributes: [String.t()] | nil,
  tags: [map_entry()] | nil
}

path_segment()

@type path_segment() :: %{
  startStopPointKey: String.t(),
  endStopPointKey: String.t(),
  startStationName: String.t(),
  startStationKey: String.t(),
  startDateTime: integer(),
  endStationName: String.t(),
  endStationKey: String.t(),
  endDateTime: integer(),
  track: vehicle_map_path(),
  destination: String.t(),
  realtimeDelay: integer() | nil,
  isFirst: boolean() | nil,
  isLast: boolean() | nil
}

penalty()

@type penalty() :: %{name: String.t(), value: String.t()}

person_info()

@type person_info() :: %{personType: person_type(), personCount: integer() | nil}

person_type()

@type person_type() ::
  :ALL | :ADULT | :ELDERLY | :APPRENTICE | :PUPIL | :STUDENT | :CHILD

profile_type()

@type profile_type() ::
  :BICYCLE_NORMAL
  | :BICYCLE_RACING
  | :BICYCLE_QUIET_ROADS
  | :BICYCLE_MAIN_ROADS
  | :BICYCLE_BAD_WEATHER
  | :FOOT_NORMAL

property()

@type property() :: %{key: String.t(), value: String.t() | nil}

realtime_type()

@type realtime_type() :: :PLANDATA | :REALTIME | :AUTO

region_type()

@type region_type() ::
  :ZONE | :GH_ZONE | :RING | :COUNTY | :GH | :NET | :ZG | :STADTVERKEHR

required_region_type()

@type required_region_type() :: %{type: region_type(), count: integer() | nil}

schedule()

@type schedule() :: %{
  routeId: integer() | nil,
  start: sd_name(),
  dest: sd_name(),
  time: integer() | nil,
  footpathTime: integer() | nil,
  plannedDepartureTime: String.t() | nil,
  realDepartureTime: String.t() | nil,
  plannedArrivalTime: String.t() | nil,
  realArrivalTime: String.t() | nil,
  tickets: [ticket()] | nil,
  tariffInfos: [tariff_info()] | nil,
  scheduleElements: [schedule_element()] | nil,
  contSearchBefore: cont_search_by_service_id() | nil,
  contSearchAfter: cont_search_by_service_id() | nil
}

schedule_element()

@type schedule_element() :: %{
  from: journey_sd_name(),
  to: journey_sd_name(),
  line: service(),
  paths: [path()] | nil,
  attributes: [attribute()] | nil,
  announcements: [announcement()] | nil,
  extra: boolean(),
  cancelled: boolean(),
  intermediateStops: [journey_sd_name()] | nil,
  vehicles: [vehicle()] | nil,
  serviceId: integer() | nil,
  shopInfo: [shop_info()] | nil
}

sd_name()

@type sd_name() :: %{
  name: String.t() | nil,
  city: String.t() | nil,
  combinedName: String.t() | nil,
  id: String.t(),
  globalId: String.t() | nil,
  provider: String.t() | nil,
  type: location_type(),
  coordinate: coordinate() | nil,
  layer: integer() | nil,
  tariffDetails: tariff_details() | nil,
  serviceTypes: [String.t()] | nil,
  hasStationInformation: boolean() | nil,
  address: String.t() | nil
}

segments_type()

@type segments_type() :: :BEFORE | :AFTER | :ALL

service()

@type service() :: %{
  name: String.t(),
  direction: String.t() | nil,
  directionId: integer() | nil,
  origin: String.t() | nil,
  type: service_type_info(),
  id: String.t() | nil,
  dlid: String.t() | nil,
  carrierNameShort: String.t() | nil,
  carrierNameLong: String.t() | nil
}

service_type()

@type service_type() ::
  :BUS
  | :TRAIN
  | :SHIP
  | :FOOTPATH
  | :BICYCLE
  | :AIRPLANE
  | :CHANGE
  | :CHANGE_SAME_PLATFORM
  | :ACTIVITY_BIKE_AND_RIDE

service_type_info()

@type service_type_info() :: %{
  simpleType: simple_service_type(),
  shortInfo: String.t() | nil,
  longInfo: String.t() | nil,
  model: String.t() | nil
}

shop_info()

@type shop_info() :: %{shopType: shop_type(), url: String.t()}

shop_type()

@type shop_type() :: :AST

simple_service_type()

@type simple_service_type() ::
  :BUS
  | :TRAIN
  | :SHIP
  | :FOOTPATH
  | :BICYCLE
  | :AIRPLANE
  | :CHANGE
  | :CHANGE_SAME_PLATFORM
  | :ACTIVITY_BIKE_AND_RIDE

speed_type()

@type speed_type() :: :NORMAL

station_light()

@type station_light() :: %{id: String.t(), name: String.t()}

station_list_entry()

@type station_list_entry() :: %{
  id: String.t(),
  name: String.t() | nil,
  city: String.t() | nil,
  combinedName: String.t() | nil,
  shortcuts: [String.t()] | nil,
  aliasses: [String.t()] | nil,
  vehicleTypes: [vehicle_type()] | nil,
  coordinate: coordinate() | nil,
  exists: boolean()
}

subline_list_entry()

@type subline_list_entry() :: %{
  sublineNumber: String.t(),
  vehicleType: vehicle_type(),
  stationSequence: [station_light()] | nil
}

tariff_county()

@type tariff_county() :: %{id: String.t(), label: String.t()}

tariff_details()

@type tariff_details() :: %{
  innerCity: boolean() | nil,
  city: boolean() | nil,
  cityTraffic: boolean() | nil,
  gratis: boolean() | nil,
  greaterArea: boolean() | nil,
  shVillageId: integer() | nil,
  shTariffZone: integer() | nil,
  tariffZones: [integer()] | nil,
  regions: [integer()] | nil,
  counties: [String.t()] | nil,
  rings: [String.t()] | nil,
  fareStage: boolean() | nil,
  fareStageNumber: integer() | nil,
  tariffNames: [String.t()] | nil,
  uniqueValues: boolean() | nil
}

tariff_info()

@type tariff_info() :: %{
  tariffName: String.t(),
  tariffRegions: [tariff_region_info()] | nil,
  regionTexts: [String.t()] | nil,
  extraFareType: extra_fare_type(),
  ticketInfos: [map()] | nil,
  ticketRemarks: String.t() | nil
}

tariff_info_selector()

@type tariff_info_selector() :: %{
  tariff: String.t(),
  tariffRegions: boolean(),
  kinds: [integer()] | nil,
  groups: [integer()] | nil,
  blacklist: boolean()
}

tariff_kind()

@type tariff_kind() :: %{
  id: integer() | nil,
  label: String.t(),
  requiresPersonType: boolean(),
  ticketType: ticket_type() | nil,
  levelCombinations: [integer()] | nil
}

tariff_level()

@type tariff_level() :: %{
  id: integer() | nil,
  label: String.t(),
  requiredRegionType: required_region_type()
}

tariff_optimizer_regions()

@type tariff_optimizer_regions() :: %{
  zones: [tariff_regions()] | nil,
  rings: [tariff_regions()] | nil,
  counties: [tariff_regions()] | nil
}

tariff_optimizer_ticket()

@type tariff_optimizer_ticket() :: %{
  tariffKindId: integer() | nil,
  tariffKindLabel: String.t() | nil,
  tariffLevelId: integer() | nil,
  tariffLevelLabel: String.t() | nil,
  tariffRegions: [String.t()],
  regionType: region_type(),
  count: integer() | nil,
  extraFare: boolean() | nil,
  personType: person_type(),
  centPrice: integer() | nil
}

tariff_region_info()

@type tariff_region_info() :: %{
  regionType: region_type(),
  alternatives: [tariff_regions()] | nil
}

tariff_regions()

@type tariff_regions() :: %{regions: [String.t()]}

tariff_zone()

@type tariff_zone() :: %{zone: String.t(), ring: String.t(), neighbours: [String.t()]}

ticket()

@type ticket() :: %{
  price: float() | nil,
  reducedPrice: float() | nil,
  currency: String.t(),
  type: String.t(),
  level: String.t(),
  tariff: String.t(),
  range: String.t() | nil,
  ticketRemarks: String.t() | nil
}

ticket_class()

@type ticket_class() :: :NONE | :SECOND | :FIRST | :SCHNELL

ticket_info_basic()

@type ticket_info_basic() :: %{
  tariffKindID: integer() | nil,
  tariffKindLabel: String.t(),
  tariffLevelID: integer() | nil,
  tariffLevelLabel: String.t(),
  tariffGroupID: integer() | nil,
  tariffGroupLabel: String.t() | nil,
  regionType: region_type() | nil,
  selectableRegions: integer(),
  requiredStartStation: boolean(),
  personInfos: [person_info()] | nil,
  validityPeriods: [validity_period()] | nil,
  variants: [ticket_variant()] | nil
}

ticket_type()

@type ticket_type() :: :OCCASIONAL_TICKET | :SEASON_TICKET

ticket_variant()

@type ticket_variant() :: %{
  ticketId: integer() | nil,
  kaNummer: integer() | nil,
  price: float() | nil,
  currency: String.t(),
  ticketClass: ticket_class(),
  discount: discount_type(),
  validityBegin: String.t(),
  validityEnd: String.t()
}

time_period()

@type time_period() :: %{begin: String.t(), end: String.t()}

time_range()

@type time_range() :: %{begin: String.t(), end: String.t()}

validity_period()

@type validity_period() :: %{day: day_type(), timeValidities: [time_period()]}

vehicle()

@type vehicle() :: %{id: String.t() | nil, number: String.t() | nil}

vehicle_map_path()

@type vehicle_map_path() :: %{
  track: [float()] | nil,
  coordinateType: coordinate_type()
}

vehicle_type()

@type vehicle_type() ::
  :REGIONALBUS
  | :METROBUS
  | :NACHTBUS
  | :SCHNELLBUS
  | :XPRESSBUS
  | :AST
  | :SCHIFF
  | :U_BAHN
  | :S_BAHN
  | :A_BAHN
  | :R_BAHN
  | :F_BAHN
  | :EILBUS