goefa icon indicating copy to clipboard operation
goefa copied to clipboard

a go (golang) client library to access data of public transport companies which provide an EFA interface.

goefa

package goefa implements a go (golang) client library to access data of public transport companies which provide an EFA interface. You can search a stop, get its next departures or request a trip.

goefa

Installation

run

go get -v

to get 3rdparty libraries.

then run

go run examples/departure_monitor.go

to try the departure monitor example

Usage

Simple example on how to verify a stop and get the departures:

// create a new EFAProvider
myprovider, err := goefa.ProviderFromJson("avv")

// Find a stop by name
idtfd, stops, err := myprovider.FindStop("Königsplatz")

// If stop was identified get the 5 next departures
deps, err := stops[0].Departures(time.Now(), 5)

GoDoc