All Projects → feuerrot → Aseag Python

feuerrot / Aseag Python

Licence: other
Das sollte mal zu einer vernünftigen API-Implementation werden, ist derzeit aber einfach nur ein Client

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Aseag Python

kiel-live
This app allows you to view live updates of bus arrivals.
Stars: ✭ 20 (+81.82%)
Mutual labels:  public-transportation
GTFS-ride
GTFS-ride is an open standard for storing and sharing fixed-route transit ridership data.
Stars: ✭ 43 (+290.91%)
Mutual labels:  public-transportation
Onebusaway Android
The official Android/Fire Phone app for OneBusAway
Stars: ✭ 388 (+3427.27%)
Mutual labels:  public-transportation
bmtc
Ruby wrapper for Bangalore Metropolitan Transport Corporation BMTC Intelligent Transport System (ITS) API
Stars: ✭ 13 (+18.18%)
Mutual labels:  public-transportation
dm tomatrixled
Display (real-time) public transport departures using Raspberry Pi and LED matrices
Stars: ✭ 17 (+54.55%)
Mutual labels:  public-transportation
Public Transport Enabler
Unleash public transport data in your Java project.
Stars: ✭ 264 (+2300%)
Mutual labels:  public-transportation
european-transport-operators
NOT UP-TO-DATE ANYMORE, UNMAINTAINED. CHECK european-transport-feeds INSTEAD. List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.
Stars: ✭ 47 (+327.27%)
Mutual labels:  public-transportation
European Transport Modules
[DISCONTINUED in favour of public-transport-operators] Collection of european transport JavaScript modules.
Stars: ✭ 9 (-18.18%)
Mutual labels:  public-transportation
ara
Ara is a golang server for real-time public transport data exchange, using the SIRI protocol.
Stars: ✭ 12 (+9.09%)
Mutual labels:  public-transportation
Navitia
The open source software to build cool stuff with locomotion
Stars: ✭ 352 (+3100%)
Mutual labels:  public-transportation
TimisoaraPublicTransport
An Android App that scrapes public transport information (times/connections) and shows it on your Android.
Stars: ✭ 25 (+127.27%)
Mutual labels:  public-transportation
transit
Massively real-time city transit streaming application
Stars: ✭ 20 (+81.82%)
Mutual labels:  public-transportation
Graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
Stars: ✭ 3,457 (+31327.27%)
Mutual labels:  public-transportation
dvbjs
🚊 Query Dresden's public transport system for current bus- and tramstop data in node
Stars: ✭ 38 (+245.45%)
Mutual labels:  public-transportation
Transportr
Free Public Transport Assistant without Ads or Tracking
Stars: ✭ 678 (+6063.64%)
Mutual labels:  public-transportation
spuf-314
a Web Application prototype for public transportation, serving a RESTful API to find Stations, Bus, Metro and Tramway's Lines, while also computing the best multimodal path between two stations or addresses
Stars: ✭ 22 (+100%)
Mutual labels:  public-transportation
Transit-Talk
Building tools that improve overall transit user experience by connecting riders to each other, and to the agencies that serve them.
Stars: ✭ 22 (+100%)
Mutual labels:  public-transportation
Prague Public Transport
Gives you times of the next trams around your location in Prague.
Stars: ✭ 11 (+0%)
Mutual labels:  public-transportation
Transit
This Python module polls transit agencies for real-time bus arrival predictions.
Stars: ✭ 6 (-45.45%)
Mutual labels:  public-transportation
Node Gtfs
Import GTFS transit data into SQLite and query routes, stops, times, fares and more.
Stars: ✭ 323 (+2836.36%)
Mutual labels:  public-transportation

Aseag, Python?

Die ASEAG bietet für Smartphones eine Anwendung an, die auf eine API zugreift, die Echtzeitdaten liefert. Da man das natürlich auch gerne in eigenen Anwendungen nutzen will, um Dinge™ anzuzeigen - ein eigener Abfahrtsmonitor wird so z.B. möglich.

Technische Details

Allgemein

http://ivu.aseag.de/interfaces/ura/ ist die Basis, unter der dann alle Endpunkte erreichbar sind. Es scheint so, als wären dort dann zwei generelle Typen unterscheidbar.

{instant,stream}_V{1,2}

Diese vier Endpunkte geben die aktuellen Informationen aus (instant) bzw. streamen sie (stream). Wo genau der Unterschied zwischen _V1 und _V2 ist, ist nicht bekannt. Transport for London hat eine API-Dokumentation, die ganz gut die Verwendung beschreibt.

Die Endpunkte eignen sich wahrscheinlich für Echtzeitdaten für Haltestellen und einzelne Busläufe.

{location,journey,journeyUpdate}

Diese drei Endpunkte geben jeweils nicht-kaputtes JSON aus (yay), aus denen man insbesondere recht einfach die Bedeutung von Werten rauslesen kann und dienen dazu, Haltestellen zu finden (location), Routing zu planen (journey) und Informationen zum Routing aktuell zu halten (journeyUpdate).

location?searchString=NAME findet Haltestellen mit passendem Name. Der Parameter maxResults kann dazu verwendet werden, das ganze weiter einzuschränken oder auch in Kombination mit * als Name, um alle Haltestellen auszugeben. Der Defaultwert scheint 10 zu sein. Der Parameter searchTypes kennt mindestens den Wert STOPPOINT, was auch der Defaultwert ist.

journey?startStopId=A&endStopId=B&departureTime=C gibt Routinginformationen aus. Die HaltestellenIDs A und B ergeben sich aus dem location-Endpunkt, departureTime ist ein Unix Timestamp in Millisekunden. Anstatt departureTime ist auch die Angabe von arrivalTime möglich(?).

journeyUpdate tut komische Dinge mit einem Parameter, der aus journey rausfällt und weiteren Parametern. Keine Ahnung, hab ich bisher noch nicht verwendet.

Benutzung

./main [StopID] [BusIDs] macht Echtzeitinformationen zur Haltestelle. Als StopID funktionieren sowohl Haltestellennamen als auch die numerischen IDs.

./main [StartID] [StopID] macht Routing vom Start zum Stop. Für die IDs gilt das gleiche wie bei den Echtzeitinformationen.

Todo

Der Code ist scheiße. Über die Ausgabe von instant_V{1,2} kann man wahrscheinlich deutlich schöner iterieren und ich habe beim Einbauen des Routing viel Code aus der vorherigen Version übernommen. Man müsste also den ganzen Code mal wegwerfen und alles sauber neu schreiben - das wird in $(date +%Y) natürlich nicht passieren. Was ggf. in $(date +%Y) passiert:

  • [ ] Weniger magisches Argumentparsing
  • [ ] Sinnvolleres Iterieren über die Ausgabe von instant_V{1,2}
  • [ ] Nutzung von stream_V{1,2} für eigene Echtzeitanzeigen
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].