vbb

package
v0.0.0-...-d299a3d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByTime

type ByTime []Departure

func (ByTime) Len

func (d ByTime) Len() int

func (ByTime) Less

func (d ByTime) Less(i, j int) bool

func (ByTime) Swap

func (d ByTime) Swap(i, j int)

type Departure

type Departure struct {
	Name             string           `json:"name"`
	Type             string           `json:"type"`
	Time             string           `json:"time"`
	Date             string           `json:"date"`
	RtTime           string           `json:"rtTime"`
	RtDate           string           `json:"rtDate"`
	Direction        string           `json:"direction"`
	Product          []Product        `json:"Product"`
	JourneyDetailRef JourneyDetailRef `json:"JourneyDetailRef"`
}

func (*Departure) ParseDateTime

func (d *Departure) ParseDateTime(rt bool) (t time.Time, err error)

type DepartureResult

type DepartureResult struct {
	Departures     []Departure `json:"Departure"`
	ServerVersion  string      `json:"serverVersion"`
	DialectVersion string      `json:"dialectVersion"`
	PlanRtTs       int64       `json:"planRtTs"`
	ErrorCode      string      `json:"errorCode"`
	ErrorText      string      `json:"errorText"`
}

type JourneyDetailRef

type JourneyDetailRef struct {
	Ref string `json:"ref"`
}

type Product

type Product struct {
	Name     string `json:"name"`
	Line     string `json:"line"`
	Category string `json:"catIn"`
}

type VBB

type VBB struct {
	// contains filtered or unexported fields
}

func New

func New(accessID, baseURL string) *VBB

func (*VBB) GetDepartures

func (vbb *VBB) GetDepartures(extId string, offset time.Duration) ([]Departure, bool)

func (*VBB) SortDepartures

func (vbb *VBB) SortDepartures(ds []Departure, ttype, exclude string, offset time.Duration, limit int) []Departure

Jump to

Keyboard shortcuts

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