All Projects â†’ kiliankoe â†’ DVB

kiliankoe / DVB

Licence: MIT license
🚆 Query Dresden's public transport system for current bus- and tramstop data in swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to DVB

dvbjs
🚊 Query Dresden's public transport system for current bus- and tramstop data in node
Stars: ✭ 38 (+72.73%)
Mutual labels:  public-transportation, dvb, vvo, dresden
dvbpy
🚋 Query Dresden's public transport system for current bus- and tramstop data in python
Stars: ✭ 38 (+72.73%)
Mutual labels:  public-transportation, dvb, vvo, dresden
Graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
Stars: ✭ 3,457 (+15613.64%)
Mutual labels:  public-transportation
Onebusaway Application Modules
The core OneBusAway application suite.
Stars: ✭ 174 (+690.91%)
Mutual labels:  public-transportation
Aseag Python
Das sollte mal zu einer vernünftigen API-Implementation werden, ist derzeit aber einfach nur ein Client
Stars: ✭ 11 (-50%)
Mutual labels:  public-transportation
Navitia
The open source software to build cool stuff with locomotion
Stars: ✭ 352 (+1500%)
Mutual labels:  public-transportation
Openmetromaps
Main repository for OpenMetroMaps
Stars: ✭ 27 (+22.73%)
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 (+0%)
Mutual labels:  public-transportation
node-dvbtee
MPEG2 transport stream parser for Node.js with support for television broadcast PSIP tables and descriptors
Stars: ✭ 24 (+9.09%)
Mutual labels:  dvb
Prague Public Transport
Gives you times of the next trams around your location in Prague.
Stars: ✭ 11 (-50%)
Mutual labels:  public-transportation
Gtfs To Html
Build human readable transit timetables as HTML or PDF from GTFS.
Stars: ✭ 119 (+440.91%)
Mutual labels:  public-transportation
European Transport Modules
[DISCONTINUED in favour of public-transport-operators] Collection of european transport JavaScript modules.
Stars: ✭ 9 (-59.09%)
Mutual labels:  public-transportation
Onebusaway Android
The official Android/Fire Phone app for OneBusAway
Stars: ✭ 388 (+1663.64%)
Mutual labels:  public-transportation
Vbb Modules
List of JavaScript modules for Berlin & Brandenburg public transport.
Stars: ✭ 47 (+113.64%)
Mutual labels:  public-transportation
Node Gtfs
Import GTFS transit data into SQLite and query routes, stops, times, fares and more.
Stars: ✭ 323 (+1368.18%)
Mutual labels:  public-transportation
Busrouter Sg
BusRouter SG: Singapore Bus Routes Explorer
Stars: ✭ 238 (+981.82%)
Mutual labels:  public-transportation
Public Transport Enabler
Unleash public transport data in your Java project.
Stars: ✭ 264 (+1100%)
Mutual labels:  public-transportation
Transit
This Python module polls transit agencies for real-time bus arrival predictions.
Stars: ✭ 6 (-72.73%)
Mutual labels:  public-transportation
Bookingapi
A simple API to book tickets for public transport in Switzerland.
Stars: ✭ 15 (-31.82%)
Mutual labels:  public-transportation
osmot
Preprocessor for make public transit maps from Openstreetmap data
Stars: ✭ 14 (-36.36%)
Mutual labels:  public-transportation

🚆DVB

Travis Version Platform Docs

This is an unofficial Swift package giving you a few options to query Dresden's public transport system for current bus- and tramstop data.

Want something like this for another language, look no further 🙂

Example

Have a look at the example iOS app.

Installation

DVB is available through Cocoapods, Carthage/Punic and Swift Package Manager, whatever floats your boat.

// Cocoapods
pod 'DVB'

// Carthage
github "kiliankoe/DVB"

// Swift Package Manager
.package(url: "https://github.com/kiliankoe/DVB", from: "latest_version")

Quick Start

Be sure to check the docs for more detailed information on how to use this library, but here are some quick examples for getting started right away.

Caveat: Stops are always represented by their ID. You can get a stop's ID via Stop.find(). Some of the methods listed below offer convenience overloads, which are listed here since they look nicer. The downside to these is that they have to send of a find request for every stop first resulting in a significant overhead. Should you already have a stop's ID at hand I strongly suggest you use that instead.

Monitor a single stop

Monitor a single stop to see every bus, tram or whatever leaving this stop. The necessary stop id can be found by using the find() function.

// See caveat above
Departure.monitor(stopWithName: "Postplatz") { result in
    guard let response = result.success else { return }
    print(response.departures)
}

Find a specific stop

Say you're looking for "Helmholtzstraße". You can use the following to find a list of matches.

Stop.find("Helmholtzstraße") { result in
    guard let response = result.success else { return }
    print(response.stops)
}

You can also get a list of stops around a given coordinate.

let coordinate = CLLocationCoordinate2D(latitude: 51.063080, longitude: 13.736835)
Stop.findNear(coordinate) { result in
    guard let response = result.success else { return }
    print(response.stops)
}

Find a route from A to B

Want to go somewhere?

// See caveat above
Trip.find(from: "Albertplatz", to: "Hauptbahnhof") { result in
    guard let response = result.success else { return }
    print(response.routes)
}

Look up current route changes

Want to see if your favorite lines are currently being re-routed due to construction or some other reason? Check the published list of route changes.

RouteChange.get { result in
    guard let response = result.success else { return }
    print(response.lines)
    print(response.changes)
}

Lines running at a specific stop

Looking to find which lines service a specific stop? There's a func for that.

// See caveat above
Line.get(forStopName: "Postplatz") { result in
    guard let response = result.success else { return }
    print(response.lines)
}

Authors

Kilian Koeltzsch, @kiliankoe

Max Kattner, @maxkattner

License

DVB is available under the MIT license. See the LICENSE file for more info.

Terms of Service

Please refer to the VVO Terms of Service regarding their widget. Take particular care not to use this library to hammer their servers through too many requests to their graciously-provided API.

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].