Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeHmac256 ¶
Generates the Signature for the Header
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithTestUrl ¶
func (*Client) DepartureList ¶
func (c *Client) DepartureList(r *config.HVVDepartureListRequest) (*HVVDepartureListResponse, error)
func (*Client) GetRoute ¶
func (c *Client) GetRoute(r *config.HVVRequest) (*GetRouteResponse, error)
type GetRouteResponse ¶
type GetRouteResponse struct { RealtimeSchedules []struct { Start config.Station `json:"start"` Dest config.Station `json:"dest"` Time float64 `json:"time"` FootpathTime float64 `json:"footpathTime"` ScheduleElements []struct { From struct { Name string `json:"name"` DepTime config.DateTime `json:"depTime"` } `json:"from,omitempty"` To struct { Name string `json:"name"` ArrTime config.DateTime `json:"arrTime"` } `json:"to,omitempty"` Line struct { BusLine string `json:"name"` Direction string `json:"direction"` Origin string `json:"origin"` Type struct { SimpleType string `json:"simpleType"` ShortInfo string `json:"shortInfo"` } `json:"type"` } `json:"line,omitempty"` } `json:"scheduleElements"` } `json:"realtimeSchedules"` }
Expected Response from HBT API
type HVVCommonResponse ¶
type HVVCommonResponse struct { Status config.Status `json:"returnCode"` ErrorMessage config.ErrorMessage `json:"errorDevInfo,omitempty"` ErrorText string `json:"errorText,omitempty"` }
func (*HVVCommonResponse) StatusError ¶
func (c *HVVCommonResponse) StatusError() error
StatusError returns an error if this object has a Status different
type HVVDepartureListResponse ¶
type HVVDepartureListResponse struct { Time struct { Date string `json:"date"` Time string `json:"time"` } `json:"time"` Departures []struct { Line struct { Name string `json:"name"` Direction string `json:"direction"` Origin string `json:"origin"` Type struct { SimpleType string `json:"simpleType"` ShortInfo string `json:"shortInfo"` } `json:"type"` } `json:"line"` TimeOffset int `json:"timeOffset"` } `json:"departures"` }
Expected Response for DepatureList from HBT API
Click to show internal directories.
Click to hide internal directories.