Documentation ¶
Overview ¶
Package departurevision parses an HTML table showing departure information.
Consider this package highly experimental and subject to break without warning due to the fragile parsing logic used here. Prefer to use the njtapi package wherever possible for a more stable and robust interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to HTML-based departure information.
func NewClient ¶
NewClient creates a new client to access data from a supplied endpoint.
Sample baseURL: http://dv.njtransit.com/mobile/tid-mobile.aspx.
func (*Client) Departures ¶
Departures finds a simplified list of departures given a 2-character station code.
Sample station: NY
This datasource provides less detail than the full API. As a result, most of the fields in the response will not be set or may have values optimized for visual consumption instead of programmatic use. The `ScheduledDepartureDate` field, for example, will only have hour + minute information, not a full date and time. The `Destination` field often includes extra stop indicators and unsupported unicode symbols for the airport and Secaucus Junction.