Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalInfo ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an API client for a HAFAS REST API endpoint.
func NewClient ¶
NewClient creates a new client. Parameters:
baseURL: e.g. https://zvv.hafas.cloud/bin timeZone: e.g. Europe/Zurich
type Conn ¶
type Conn struct { Attributes []Attrs `json:"attributes"` AttributesBfr []Attrs `json:"attributes_bfr"` Cancelled bool `json:"cancelled"` Date string `json:"date"` HasGlobalHIMMessage bool `json:"hasGlobalHIMMessage"` HasHIMMessage bool `json:"hasHIMMessage"` HimMessages []interface{} `json:"himMessages"` Locations []Location `json:"locations"` MainLocation Location `json:"mainLocation"` Name string `json:"name"` Product Product `json:"product"` TrainInfo string `json:"trainInfo"` }
type Location ¶
type Location struct { Countdown string `json:"countdown"` Date string `json:"date"` Location LocationPoint `json:"location"` Platform string `json:"platform"` RealTime RealTime `json:"realTime"` Time string `json:"time"` }
func (Location) BestCountdown ¶
type LocationPoint ¶
type Product ¶
type Station ¶
type Station struct { AdditionalInformation AdditionalInfo `json:"additionalInformation"` Name string `json:"name"` }
type Stop ¶
type Stop struct { ExtID string `json:"extId"` ID string `json:"id"` ProdClass string `json:"prodClass"` State string `json:"state"` Type string `json:"type"` TypeStr string `json:"typeStr"` Name string `json:"value"` Weight string `json:"weight"` Xcoord string `json:"xcoord"` Ycoord string `json:"ycoord"` }
Click to show internal directories.
Click to hide internal directories.