ldb

package
v0.0.0-...-e526314 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetDepartureBoardRequest

func NewGetDepartureBoardRequest(rows int, from string, to string) (*http.Request, error)

NewGetDepartureBoardRequest returns an HTTP Request object ready to send to the LDB API to query services departing from and arriving at the specified stations.

Types

type GetDepartureBoardResponse

type GetDepartureBoardResponse struct {
	GetStationBoardResult *GetStationBoardResult `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/ GetStationBoardResult"`
}

func ParseGetDepartureBoardResponse

func ParseGetDepartureBoardResponse(resp *http.Response) (*GetDepartureBoardResponse, error)

ParseGetDepartureBoardResponse parses the response returned by the LDB API.

type GetStationBoardResult

type GetStationBoardResult struct {
	GeneratedAt        string         `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types generatedAt"`
	LocationName       string         `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types locationName"`
	CRS                string         `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types crs"`
	FilterLocationName string         `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types filterLocationName"`
	FilterCRS          string         `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types filtercrs"`
	PlatformAvailable  bool           `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types platformAvailable"`
	TrainServices      *TrainServices `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types trainServices"`
}

type Location

type Location struct {
	LocationName   string `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types locationName"`
	CRS            string `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types crs"`
	Via            string `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types via"`
	FutureChangeTo string `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types futureChangeTo"`
}

type LocationContainer

type LocationContainer struct {
	Location *Location `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types location"`
}

type Service

type Service struct {
	Origin       *LocationContainer `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types origin"`
	Destination  *LocationContainer `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types destination"`
	STD          string             `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types std"`
	ETD          string             `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types etd"`
	Operator     string             `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types operator"`
	OperatorCode string             `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types operatorCode"`
	Platform     string             `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types platform"`
	ServiceID    string             `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types serviceID"`
}

type TrainServices

type TrainServices struct {
	Service []*Service `xml:"http://thalesgroup.com/RTTI/2014-02-20/ldb/types service"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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