Unofficial Go client for the Dresden Transport (DVB) API. This library provides easy access to real-time public transport information for Dresden, Germany.
go get github.com/niclaszll/dvb-gopackage main
import (
"context"
"fmt"
"time"
"github.com/niclaszll/dvb-go"
)
func main() {
client := dvb.NewClient(dvb.Config{})
ctx := context.Background()
// Monitor departures from Dresden Hauptbahnhof
options := &dvb.MonitorStopParams{
StopId: "33000028",
Limit: &[]int{10}[0],
}
response, err := client.MonitorStop(ctx, options)
if err != nil {
panic(err)
}
fmt.Printf("Stop: %s\n", response.Name)
// ...
}Get real-time departures and arrivals for a specific stop.
Find routes between two locations with journey planning.
Get all available transport lines serving a stop.
Search for stops and locations by name or query.
See the example/ directory for some basic usage examples.