package module
Version: v0.0.0-...-f4fbf87 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2017 License: MIT Imports: 8 Imported by: 1


🚡 dvbgo

godoc Travis Codecov

An unofficial go package giving you a few options to query a collection of publicly accessible API methods for Dresden's public transport system.

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

Quick Start

import "github.com/kiliankoe/dvbgo"

You can now do the following for example:

func main() {
	deps, _ := Monitor("Helmholtzstraße", 0, "")

Reading the documentation on godoc will probably be of more use to see what this package can be used for than this README for now 😉

Known Usages




This section is empty.


View Source
var (
	Tram = TransportMode{
		Title:   "Straßenbahn",
		Name:    "tram",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-tram.svg",
	Citybus = TransportMode{
		Title:   "Stadtbus",
		Name:    "citybus",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-citybus.svg",
	Regiobus = TransportMode{
		Title:   "Regionalbus",
		Name:    "regiobus",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-bus.svg",
	Metropolitan = TransportMode{
		Title:   "S-Bahn",
		Name:    "metropolitan",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-metropolitan.svg",
	Lift = TransportMode{
		Title:   "Seil-/Schwebebahn",
		Name:    "lift",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-lift.svg",
	Ferry = TransportMode{
		Title:   "Fähre",
		Name:    "ferry",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-ferry.svg",
	Ast = TransportMode{
		Title:   "Anrufsammeltaxi (AST)/ Rufbus",
		Name:    "ast",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-alita.svg",
	Train = TransportMode{
		Title:   "Zug",
		Name:    "train",
		IconURL: "https://www.dvb.de/assets/img/trans-icon/transport-train.svg",

Values for possible modes of transport


This section is empty.


type Departure

type Departure struct {
	Line         string
	Direction    string
	RelativeTime int

Departure encapsulates info regarding the line, direction and relative departure time in minutes.

func Monitor

func Monitor(stop string, offset int, city string) (departures []*Departure, err error)

Monitor returns a list of upcoming departures at a given stop. Offset offsets information minutes into the future, 0 meaning now.

func (Departure) Mode

func (dep Departure) Mode() (mode TransportMode, err error)

Mode returns the departure's mode of transport

func (Departure) String

func (dep Departure) String() string

type TransportMode

type TransportMode struct {
	Title   string
	Name    string
	IconURL string

A TransportMode e.g tram, citybus, etc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL