Documentation
¶
Index ¶
Constants ¶
const CIRCLESIZE = 10
CIRCLESIZE .
const CIRCLEWIDTH = 5
CIRCLEWIDTH .
const DEFAULTLIMIT = 20
DEFAULTLIMIT is the default API limit
const MAXLIMIT = 1000
MAXLIMIT is the API limit maximum
const MAXRADIUS = 100 * 1000.0
MAXRADIUS is the maximum point search radius
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgencyRequest ¶
type AgencyRequest struct {
ID int `json:"id,string"`
Limit int `json:"limit,string"`
After int `json:"after,string"`
AgencyID string `json:"agency_id"`
AgencyName string `json:"agency_name"`
OnestopID string `json:"onestop_id"`
FeedVersionSHA1 string `json:"feed_version_sha1"`
FeedOnestopID string `json:"feed_onestop_id"`
Search string `json:"search"`
Lat float64 `json:"lat,string"`
Lon float64 `json:"lon,string"`
Radius float64 `json:"radius,string"`
}
AgencyRequest holds options for a Route request
func (AgencyRequest) Query ¶
func (r AgencyRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.
func (AgencyRequest) ResponseKey ¶
func (r AgencyRequest) ResponseKey() string
ResponseKey returns the GraphQL response entity key.
type FeedRequest ¶
type FeedRequest struct {
Key string `json:"key"`
ID int `json:"id,string"`
Limit int `json:"limit,string"`
After int `json:"after,string"`
OnestopID string `json:"onestop_id"`
Spec string `json:"spec"`
Search string `json:"search"`
FetchError string `json:"fetch_error"`
}
FeedRequest holds options for a Route request
func (FeedRequest) Query ¶
func (r FeedRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.
type FeedVersionRequest ¶
type FeedVersionRequest struct {
Key string `json:"key"`
ID int `json:"id,string"`
Limit int `json:"limit"`
After int `json:"after"`
FeedOnestopID string `json:"feed_onestop_id"`
Sha1 string `json:"sha1"`
}
FeedVersionRequest holds options for a Route request
func (FeedVersionRequest) Query ¶
func (r FeedVersionRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.
type OperatorRequest ¶
type OperatorRequest struct {
ID int `json:"id,string"`
Limit int `json:"limit,string"`
After int `json:"after,string"`
OnestopID string `json:"onestop_id"`
FeedVersionSHA1 string `json:"feed_version_sha1"`
FeedOnestopID string `json:"feed_onestop_id"`
Search string `json:"search"`
}
OperatorRequest holds options for a Route request
func (OperatorRequest) Query ¶
func (r OperatorRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.
func (OperatorRequest) ResponseKey ¶
func (r OperatorRequest) ResponseKey() string
ResponseKey returns the GraphQL response entity key.
type RouteRequest ¶
type RouteRequest struct {
Key string `json:"key"`
ID int `json:"id,string"`
Limit int `json:"limit,string"`
After int `json:"after,string"`
RouteID string `json:"route_id"`
RouteType string `json:"route_type"`
OnestopID string `json:"onestop_id"`
OperatorOnestopID string `json:"operator_onestop_id"`
IncludeGeometry string `json:"include_geometry"`
Format string `json:"format"`
Search string `json:"search"`
AgencyID int `json:"agency_id,string"`
FeedVersionSHA1 string `json:"feed_version_sha1"`
FeedOnestopID string `json:"feed_onestop_id"`
Lat float64 `json:"lat,string"`
Lon float64 `json:"lon,string"`
Radius float64 `json:"radius,string"`
}
RouteRequest holds options for a Route request
func (RouteRequest) Query ¶
func (r RouteRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.
func (RouteRequest) ResponseKey ¶
func (r RouteRequest) ResponseKey() string
ResponseKey returns the GraphQL response entity key.
type StopRequest ¶
type StopRequest struct {
Key string `json:"key"`
ID int `json:"id,string"`
Limit int `json:"limit,string"`
After int `json:"after,string"`
StopID string `json:"stop_id"`
OnestopID string `json:"onestop_id"`
FeedVersionSHA1 string `json:"feed_version_sha1"`
FeedOnestopID string `json:"feed_onestop_id"`
Search string `json:"search"`
Lat float64 `json:"lat,string"`
Lon float64 `json:"lon,string"`
Radius float64 `json:"radius,string"`
}
StopRequest holds options for a /stops request
func (StopRequest) Query ¶
func (r StopRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.
func (StopRequest) ResponseKey ¶
func (r StopRequest) ResponseKey() string
ResponseKey returns the GraphQL response entity key.
type TripRequest ¶
type TripRequest struct {
ID int `json:"id,string"`
Limit int `json:"limit,string"`
After int `json:"after,string"`
RouteID int `json:"route_id,string"`
TripID string `json:"trip_id,string"`
FeedOnestopID string `json:"feed_onestop_id,string"`
FeedVersionSHA1 string `json:"feed_version_sha1"`
IncludeGeometry string `json:"include_geometry"`
ServiceDate string `json:"service_date"`
Format string
}
TripRequest holds options for a /trips request
func (TripRequest) ProcessGeoJSON ¶
func (r TripRequest) ProcessGeoJSON(response map[string]interface{}) error
ProcessGeoJSON .
func (TripRequest) Query ¶
func (r TripRequest) Query() (string, map[string]interface{})
Query returns a GraphQL query string and variables.