Documentation
¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AgenciesWithCoverageListResponse
- type AgenciesWithCoverageListResponseData
- type AgenciesWithCoverageListResponseDataList
- type AgenciesWithCoverageService
- type AgencyGetResponse
- type AgencyGetResponseData
- type AgencyGetResponseDataEntry
- type AgencyService
- type ArrivalAndDepartureGetParams
- type ArrivalAndDepartureGetResponse
- type ArrivalAndDepartureGetResponseData
- type ArrivalAndDepartureGetResponseDataEntry
- type ArrivalAndDepartureGetResponseDataEntryTripStatus
- type ArrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocation
- type ArrivalAndDepartureGetResponseDataEntryTripStatusPosition
- type ArrivalAndDepartureListParams
- type ArrivalAndDepartureListResponse
- type ArrivalAndDepartureListResponseData
- type ArrivalAndDepartureListResponseDataEntry
- type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparture
- type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatus
- type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocation
- type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPosition
- type ArrivalAndDepartureService
- func (r *ArrivalAndDepartureService) Get(ctx context.Context, stopID string, query ArrivalAndDepartureGetParams, ...) (res *ArrivalAndDepartureGetResponse, err error)
- func (r *ArrivalAndDepartureService) List(ctx context.Context, stopID string, query ArrivalAndDepartureListParams, ...) (res *ArrivalAndDepartureListResponse, err error)
- type BlockGetResponse
- type BlockGetResponseData
- type BlockGetResponseDataEntry
- type BlockGetResponseDataEntryConfiguration
- type BlockGetResponseDataEntryConfigurationsTrip
- type BlockGetResponseDataEntryConfigurationsTripsBlockStopTime
- type BlockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTime
- type BlockService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type ConfigGetResponse
- type ConfigGetResponseData
- type ConfigGetResponseDataEntry
- type ConfigGetResponseDataEntryGitProperties
- type ConfigService
- type CurrentTimeGetResponse
- type CurrentTimeGetResponseData
- type CurrentTimeGetResponseDataEntry
- type CurrentTimeService
- type Error
- type References
- type ReferencesAgency
- type ReferencesRoute
- type ReferencesSituation
- type ReferencesSituationsActiveWindow
- type ReferencesSituationsAllAffect
- type ReferencesSituationsConsequence
- type ReferencesSituationsConsequencesConditionDetails
- type ReferencesSituationsConsequencesConditionDetailsDiversionPath
- type ReferencesSituationsDescription
- type ReferencesSituationsPublicationWindow
- type ReferencesSituationsReason
- type ReferencesSituationsSummary
- type ReferencesSituationsURL
- type ReferencesStop
- type ReferencesStopTime
- type ReferencesTrip
- type ReportProblemWithStopGetParams
- type ReportProblemWithStopGetParamsCode
- type ReportProblemWithStopService
- type ReportProblemWithTripGetParams
- type ReportProblemWithTripGetParamsCode
- type ReportProblemWithTripService
- type ResponseWrapper
- type RouteGetResponse
- type RouteGetResponseData
- type RouteGetResponseDataEntry
- type RouteIDsForAgencyListResponse
- type RouteIDsForAgencyListResponseData
- type RouteIDsForAgencyService
- type RouteService
- type RoutesForAgencyListResponse
- type RoutesForAgencyListResponseData
- type RoutesForAgencyListResponseDataList
- type RoutesForAgencyService
- type RoutesForLocationListParams
- type RoutesForLocationListResponse
- type RoutesForLocationListResponseData
- type RoutesForLocationListResponseDataList
- type RoutesForLocationService
- type ScheduleForRouteGetParams
- type ScheduleForRouteGetResponse
- type ScheduleForRouteGetResponseData
- type ScheduleForRouteGetResponseDataEntry
- type ScheduleForRouteGetResponseDataEntryStop
- type ScheduleForRouteGetResponseDataEntryStopTripGrouping
- type ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTime
- type ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTime
- type ScheduleForRouteGetResponseDataEntryTrip
- type ScheduleForRouteService
- type ScheduleForStopGetParams
- type ScheduleForStopGetResponse
- type ScheduleForStopGetResponseData
- type ScheduleForStopGetResponseDataEntry
- type ScheduleForStopGetResponseDataEntryStopRouteSchedule
- type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedule
- type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequency
- type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTime
- type ScheduleForStopService
- type SearchForRouteListParams
- type SearchForRouteListResponse
- type SearchForRouteListResponseData
- type SearchForRouteListResponseDataList
- type SearchForRouteService
- type SearchForStopListParams
- type SearchForStopListResponse
- type SearchForStopListResponseData
- type SearchForStopListResponseDataList
- type SearchForStopService
- type ShapeGetResponse
- type ShapeGetResponseData
- type ShapeGetResponseDataEntry
- type ShapeService
- type StopGetResponse
- type StopGetResponseData
- type StopGetResponseDataEntry
- type StopIDsForAgencyListResponse
- type StopIDsForAgencyListResponseData
- type StopIDsForAgencyService
- type StopService
- type StopsForAgencyListResponse
- type StopsForAgencyListResponseList
- type StopsForAgencyService
- type StopsForLocationListParams
- type StopsForLocationListResponse
- type StopsForLocationListResponseData
- type StopsForLocationListResponseDataList
- type StopsForLocationService
- type StopsForRouteListParams
- type StopsForRouteListResponse
- type StopsForRouteListResponseData
- type StopsForRouteListResponseDataEntry
- type StopsForRouteListResponseDataEntryPolyline
- type StopsForRouteListResponseDataEntryStopGrouping
- type StopsForRouteListResponseDataEntryStopGroupingsName
- type StopsForRouteListResponseDataEntryStopGroupingsPolyline
- type StopsForRouteService
- type TripDetailGetParams
- type TripDetailGetResponse
- type TripDetailGetResponseData
- type TripDetailGetResponseDataEntry
- type TripDetailGetResponseDataEntrySchedule
- type TripDetailGetResponseDataEntryScheduleStopTime
- type TripDetailGetResponseDataEntryStatus
- type TripDetailGetResponseDataEntryStatusLastKnownLocation
- type TripDetailGetResponseDataEntryStatusPosition
- type TripDetailService
- type TripForVehicleGetParams
- type TripForVehicleGetResponse
- type TripForVehicleGetResponseData
- type TripForVehicleGetResponseDataEntry
- type TripForVehicleGetResponseDataEntrySchedule
- type TripForVehicleGetResponseDataEntryScheduleStopTime
- type TripForVehicleGetResponseDataEntryStatus
- type TripForVehicleGetResponseDataEntryStatusLastKnownLocation
- type TripForVehicleGetResponseDataEntryStatusPosition
- type TripForVehicleService
- type TripGetResponse
- type TripGetResponseData
- type TripGetResponseDataEntry
- type TripService
- type TripsForLocationListParams
- type TripsForLocationListResponse
- type TripsForLocationListResponseData
- type TripsForLocationListResponseDataList
- type TripsForLocationListResponseDataListSchedule
- type TripsForLocationListResponseDataListScheduleStopTime
- type TripsForLocationListResponseDataListStatus
- type TripsForLocationListResponseDataListStatusLastKnownLocation
- type TripsForLocationListResponseDataListStatusPosition
- type TripsForLocationService
- type TripsForRouteListParams
- type TripsForRouteListResponse
- type TripsForRouteListResponseData
- type TripsForRouteListResponseDataList
- type TripsForRouteListResponseDataListSchedule
- type TripsForRouteListResponseDataListScheduleStopTime
- type TripsForRouteListResponseDataListStatus
- type TripsForRouteListResponseDataListStatusLastKnownLocation
- type TripsForRouteListResponseDataListStatusPosition
- type TripsForRouteService
- type VehiclesForAgencyListParams
- type VehiclesForAgencyListResponse
- type VehiclesForAgencyListResponseData
- type VehiclesForAgencyListResponseDataList
- type VehiclesForAgencyListResponseDataListLocation
- type VehiclesForAgencyListResponseDataListTripStatus
- type VehiclesForAgencyListResponseDataListTripStatusLastKnownLocation
- type VehiclesForAgencyListResponseDataListTripStatusPosition
- type VehiclesForAgencyService
Constants ¶
const ReferencesSituationsReasonEnvironmentReason = shared.ReferencesSituationsReasonEnvironmentReason
This is an alias to an internal value.
const ReferencesSituationsReasonEquipmentReason = shared.ReferencesSituationsReasonEquipmentReason
This is an alias to an internal value.
const ReferencesSituationsReasonMiscellaneousReason = shared.ReferencesSituationsReasonMiscellaneousReason
This is an alias to an internal value.
const ReferencesSituationsReasonPersonnelReason = shared.ReferencesSituationsReasonPersonnelReason
This is an alias to an internal value.
const ReferencesSituationsReasonSecurityAlert = shared.ReferencesSituationsReasonSecurityAlert
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (ONEBUSAWAY_API_KEY, ONEBUSAWAY_SDK_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AgenciesWithCoverageListResponse ¶
type AgenciesWithCoverageListResponse struct { Data AgenciesWithCoverageListResponseData `json:"data,required"` JSON agenciesWithCoverageListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*AgenciesWithCoverageListResponse) UnmarshalJSON ¶
func (r *AgenciesWithCoverageListResponse) UnmarshalJSON(data []byte) (err error)
type AgenciesWithCoverageListResponseData ¶
type AgenciesWithCoverageListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []AgenciesWithCoverageListResponseDataList `json:"list,required"` References shared.References `json:"references,required"` JSON agenciesWithCoverageListResponseDataJSON `json:"-"` }
func (*AgenciesWithCoverageListResponseData) UnmarshalJSON ¶
func (r *AgenciesWithCoverageListResponseData) UnmarshalJSON(data []byte) (err error)
type AgenciesWithCoverageListResponseDataList ¶
type AgenciesWithCoverageListResponseDataList struct { AgencyID string `json:"agencyId,required"` Lat float64 `json:"lat,required"` LatSpan float64 `json:"latSpan,required"` Lon float64 `json:"lon,required"` LonSpan float64 `json:"lonSpan,required"` JSON agenciesWithCoverageListResponseDataListJSON `json:"-"` }
func (*AgenciesWithCoverageListResponseDataList) UnmarshalJSON ¶
func (r *AgenciesWithCoverageListResponseDataList) UnmarshalJSON(data []byte) (err error)
type AgenciesWithCoverageService ¶
type AgenciesWithCoverageService struct {
Options []option.RequestOption
}
AgenciesWithCoverageService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgenciesWithCoverageService method instead.
func NewAgenciesWithCoverageService ¶
func NewAgenciesWithCoverageService(opts ...option.RequestOption) (r *AgenciesWithCoverageService)
NewAgenciesWithCoverageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AgenciesWithCoverageService) List ¶
func (r *AgenciesWithCoverageService) List(ctx context.Context, opts ...option.RequestOption) (res *AgenciesWithCoverageListResponse, err error)
Returns a list of all transit agencies currently supported by OneBusAway along with the center of their coverage area.
type AgencyGetResponse ¶
type AgencyGetResponse struct { Data AgencyGetResponseData `json:"data,required"` JSON agencyGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*AgencyGetResponse) UnmarshalJSON ¶
func (r *AgencyGetResponse) UnmarshalJSON(data []byte) (err error)
type AgencyGetResponseData ¶
type AgencyGetResponseData struct { Entry AgencyGetResponseDataEntry `json:"entry,required"` LimitExceeded bool `json:"limitExceeded,required"` References shared.References `json:"references,required"` JSON agencyGetResponseDataJSON `json:"-"` }
func (*AgencyGetResponseData) UnmarshalJSON ¶
func (r *AgencyGetResponseData) UnmarshalJSON(data []byte) (err error)
type AgencyGetResponseDataEntry ¶
type AgencyGetResponseDataEntry struct { ID string `json:"id,required"` Name string `json:"name,required"` Timezone string `json:"timezone,required"` URL string `json:"url,required"` Disclaimer string `json:"disclaimer"` Email string `json:"email"` FareURL string `json:"fareUrl"` Lang string `json:"lang"` Phone string `json:"phone"` PrivateService bool `json:"privateService"` JSON agencyGetResponseDataEntryJSON `json:"-"` }
func (*AgencyGetResponseDataEntry) UnmarshalJSON ¶
func (r *AgencyGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type AgencyService ¶
type AgencyService struct {
Options []option.RequestOption
}
AgencyService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgencyService method instead.
func NewAgencyService ¶
func NewAgencyService(opts ...option.RequestOption) (r *AgencyService)
NewAgencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AgencyService) Get ¶
func (r *AgencyService) Get(ctx context.Context, agencyID string, opts ...option.RequestOption) (res *AgencyGetResponse, err error)
Retrieve information for a specific transit agency identified by its unique ID.
type ArrivalAndDepartureGetParams ¶
type ArrivalAndDepartureGetParams struct { ServiceDate param.Field[int64] `query:"serviceDate,required"` TripID param.Field[string] `query:"tripId,required"` StopSequence param.Field[int64] `query:"stopSequence"` Time param.Field[int64] `query:"time"` VehicleID param.Field[string] `query:"vehicleId"` }
func (ArrivalAndDepartureGetParams) URLQuery ¶
func (r ArrivalAndDepartureGetParams) URLQuery() (v url.Values)
URLQuery serializes ArrivalAndDepartureGetParams's query parameters as `url.Values`.
type ArrivalAndDepartureGetResponse ¶
type ArrivalAndDepartureGetResponse struct { Data ArrivalAndDepartureGetResponseData `json:"data,required"` JSON arrivalAndDepartureGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*ArrivalAndDepartureGetResponse) UnmarshalJSON ¶
func (r *ArrivalAndDepartureGetResponse) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureGetResponseData ¶
type ArrivalAndDepartureGetResponseData struct { Entry ArrivalAndDepartureGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON arrivalAndDepartureGetResponseDataJSON `json:"-"` }
func (*ArrivalAndDepartureGetResponseData) UnmarshalJSON ¶
func (r *ArrivalAndDepartureGetResponseData) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureGetResponseDataEntry ¶
type ArrivalAndDepartureGetResponseDataEntry struct { // Indicates if riders can arrive on this transit vehicle. ArrivalEnabled bool `json:"arrivalEnabled,required"` // Index of this arrival’s trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // Indicates if riders can depart from this transit vehicle. DepartureEnabled bool `json:"departureEnabled,required"` // Number of stops between the arriving transit vehicle and the current stop // (excluding the current stop). NumberOfStopsAway int64 `json:"numberOfStopsAway,required"` // Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time // available). PredictedArrivalTime int64 `json:"predictedArrivalTime,required"` // Predicted departure time, in milliseconds since Unix epoch (zero if no real-time // available). PredictedDepartureTime int64 `json:"predictedDepartureTime,required"` // The ID of the route for the arriving vehicle. RouteID string `json:"routeId,required"` // Scheduled arrival time, in milliseconds since Unix epoch. ScheduledArrivalTime int64 `json:"scheduledArrivalTime,required"` // Scheduled departure time, in milliseconds since Unix epoch. ScheduledDepartureTime int64 `json:"scheduledDepartureTime,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // The ID of the stop the vehicle is arriving at. StopID string `json:"stopId,required"` // Index of the stop into the sequence of stops that make up the trip for this // arrival. StopSequence int64 `json:"stopSequence,required"` // Total number of stops visited on the trip for this arrival. TotalStopsInTrip int64 `json:"totalStopsInTrip,required"` // Optional trip headsign that potentially overrides the trip headsign in the // referenced trip element. TripHeadsign string `json:"tripHeadsign,required"` // The ID of the trip for the arriving vehicle. TripID string `json:"tripId,required"` // ID of the transit vehicle serving this trip. VehicleID string `json:"vehicleId,required"` // The actual track information of the arriving transit vehicle. ActualTrack string `json:"actualTrack"` // Distance of the arriving transit vehicle from the stop, in meters. DistanceFromStop float64 `json:"distanceFromStop"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Historical occupancy information of the transit vehicle. HistoricalOccupancy string `json:"historicalOccupancy"` // Timestamp of the last update time for this arrival. LastUpdateTime int64 `json:"lastUpdateTime"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted"` // Interval for predicted arrival time, if available. PredictedArrivalInterval string `json:"predictedArrivalInterval"` // Interval for predicted departure time, if available. PredictedDepartureInterval string `json:"predictedDepartureInterval"` // Predicted occupancy status of the transit vehicle. PredictedOccupancy string `json:"predictedOccupancy"` // Optional route long name that potentially overrides the route long name in the // referenced route element. RouteLongName string `json:"routeLongName"` // Optional route short name that potentially overrides the route short name in the // referenced route element. RouteShortName string `json:"routeShortName"` // Interval for scheduled arrival time. ScheduledArrivalInterval string `json:"scheduledArrivalInterval"` // Interval for scheduled departure time. ScheduledDepartureInterval string `json:"scheduledDepartureInterval"` // Scheduled track information of the arriving transit vehicle. ScheduledTrack string `json:"scheduledTrack"` // References to situation elements (if any) applicable to this arrival. SituationIDs []string `json:"situationIds"` // Current status of the arrival. Status string `json:"status"` // Trip-specific status for the arriving transit vehicle. TripStatus ArrivalAndDepartureGetResponseDataEntryTripStatus `json:"tripStatus"` JSON arrivalAndDepartureGetResponseDataEntryJSON `json:"-"` }
func (*ArrivalAndDepartureGetResponseDataEntry) UnmarshalJSON ¶
func (r *ArrivalAndDepartureGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureGetResponseDataEntryTripStatus ¶
type ArrivalAndDepartureGetResponseDataEntryTripStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation ArrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position ArrivalAndDepartureGetResponseDataEntryTripStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON arrivalAndDepartureGetResponseDataEntryTripStatusJSON `json:"-"` }
Trip-specific status for the arriving transit vehicle.
func (*ArrivalAndDepartureGetResponseDataEntryTripStatus) UnmarshalJSON ¶
func (r *ArrivalAndDepartureGetResponseDataEntryTripStatus) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocation ¶
type ArrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON arrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*ArrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocation) UnmarshalJSON ¶
func (r *ArrivalAndDepartureGetResponseDataEntryTripStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureGetResponseDataEntryTripStatusPosition ¶
type ArrivalAndDepartureGetResponseDataEntryTripStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON arrivalAndDepartureGetResponseDataEntryTripStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*ArrivalAndDepartureGetResponseDataEntryTripStatusPosition) UnmarshalJSON ¶
func (r *ArrivalAndDepartureGetResponseDataEntryTripStatusPosition) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListParams ¶
type ArrivalAndDepartureListParams struct { // Include vehicles arriving or departing in the next n minutes. MinutesAfter param.Field[int64] `query:"minutesAfter"` // Include vehicles having arrived or departed in the previous n minutes. MinutesBefore param.Field[int64] `query:"minutesBefore"` // The specific time for querying the system status. Time param.Field[time.Time] `query:"time" format:"date-time"` }
func (ArrivalAndDepartureListParams) URLQuery ¶
func (r ArrivalAndDepartureListParams) URLQuery() (v url.Values)
URLQuery serializes ArrivalAndDepartureListParams's query parameters as `url.Values`.
type ArrivalAndDepartureListResponse ¶
type ArrivalAndDepartureListResponse struct { Data ArrivalAndDepartureListResponseData `json:"data,required"` JSON arrivalAndDepartureListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*ArrivalAndDepartureListResponse) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponse) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListResponseData ¶
type ArrivalAndDepartureListResponseData struct { Entry ArrivalAndDepartureListResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON arrivalAndDepartureListResponseDataJSON `json:"-"` }
func (*ArrivalAndDepartureListResponseData) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponseData) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListResponseDataEntry ¶
type ArrivalAndDepartureListResponseDataEntry struct { ArrivalsAndDepartures []ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparture `json:"arrivalsAndDepartures,required"` JSON arrivalAndDepartureListResponseDataEntryJSON `json:"-"` }
func (*ArrivalAndDepartureListResponseDataEntry) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparture ¶
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparture struct { // Indicates if riders can arrive on this transit vehicle. ArrivalEnabled bool `json:"arrivalEnabled,required"` // Index of this arrival’s trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // Indicates if riders can depart from this transit vehicle. DepartureEnabled bool `json:"departureEnabled,required"` // Number of stops between the arriving transit vehicle and the current stop // (excluding the current stop). NumberOfStopsAway int64 `json:"numberOfStopsAway,required"` // Predicted arrival time, in milliseconds since Unix epoch (zero if no real-time // available). PredictedArrivalTime int64 `json:"predictedArrivalTime,required"` // Predicted departure time, in milliseconds since Unix epoch (zero if no real-time // available). PredictedDepartureTime int64 `json:"predictedDepartureTime,required"` // The ID of the route for the arriving vehicle. RouteID string `json:"routeId,required"` // Scheduled arrival time, in milliseconds since Unix epoch. ScheduledArrivalTime int64 `json:"scheduledArrivalTime,required"` // Scheduled departure time, in milliseconds since Unix epoch. ScheduledDepartureTime int64 `json:"scheduledDepartureTime,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // The ID of the stop the vehicle is arriving at. StopID string `json:"stopId,required"` // Index of the stop into the sequence of stops that make up the trip for this // arrival. StopSequence int64 `json:"stopSequence,required"` // Total number of stops visited on the trip for this arrival. TotalStopsInTrip int64 `json:"totalStopsInTrip,required"` // Optional trip headsign that potentially overrides the trip headsign in the // referenced trip element. TripHeadsign string `json:"tripHeadsign,required"` // The ID of the trip for the arriving vehicle. TripID string `json:"tripId,required"` // ID of the transit vehicle serving this trip. VehicleID string `json:"vehicleId,required"` // The actual track information of the arriving transit vehicle. ActualTrack string `json:"actualTrack"` // Distance of the arriving transit vehicle from the stop, in meters. DistanceFromStop float64 `json:"distanceFromStop"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Historical occupancy information of the transit vehicle. HistoricalOccupancy string `json:"historicalOccupancy"` // Timestamp of the last update time for this arrival. LastUpdateTime int64 `json:"lastUpdateTime"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted"` // Interval for predicted arrival time, if available. PredictedArrivalInterval string `json:"predictedArrivalInterval"` // Interval for predicted departure time, if available. PredictedDepartureInterval string `json:"predictedDepartureInterval"` // Predicted occupancy status of the transit vehicle. PredictedOccupancy string `json:"predictedOccupancy"` // Optional route long name that potentially overrides the route long name in the // referenced route element. RouteLongName string `json:"routeLongName"` // Optional route short name that potentially overrides the route short name in the // referenced route element. RouteShortName string `json:"routeShortName"` // Interval for scheduled arrival time. ScheduledArrivalInterval string `json:"scheduledArrivalInterval"` // Interval for scheduled departure time. ScheduledDepartureInterval string `json:"scheduledDepartureInterval"` // Scheduled track information of the arriving transit vehicle. ScheduledTrack string `json:"scheduledTrack"` // References to situation elements (if any) applicable to this arrival. SituationIDs []string `json:"situationIds"` // Current status of the arrival. Status string `json:"status"` // Trip-specific status for the arriving transit vehicle. TripStatus ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatus `json:"tripStatus"` JSON arrivalAndDepartureListResponseDataEntryArrivalsAndDepartureJSON `json:"-"` }
func (*ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparture) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparture) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatus ¶
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON arrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusJSON `json:"-"` }
Trip-specific status for the arriving transit vehicle.
func (*ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatus) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatus) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocation ¶
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON arrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocation) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPosition ¶
type ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON arrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPosition) UnmarshalJSON ¶
func (r *ArrivalAndDepartureListResponseDataEntryArrivalsAndDeparturesTripStatusPosition) UnmarshalJSON(data []byte) (err error)
type ArrivalAndDepartureService ¶
type ArrivalAndDepartureService struct {
Options []option.RequestOption
}
ArrivalAndDepartureService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewArrivalAndDepartureService method instead.
func NewArrivalAndDepartureService ¶
func NewArrivalAndDepartureService(opts ...option.RequestOption) (r *ArrivalAndDepartureService)
NewArrivalAndDepartureService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ArrivalAndDepartureService) Get ¶
func (r *ArrivalAndDepartureService) Get(ctx context.Context, stopID string, query ArrivalAndDepartureGetParams, opts ...option.RequestOption) (res *ArrivalAndDepartureGetResponse, err error)
arrival-and-departure-for-stop
func (*ArrivalAndDepartureService) List ¶
func (r *ArrivalAndDepartureService) List(ctx context.Context, stopID string, query ArrivalAndDepartureListParams, opts ...option.RequestOption) (res *ArrivalAndDepartureListResponse, err error)
arrivals-and-departures-for-stop
type BlockGetResponse ¶
type BlockGetResponse struct { Data BlockGetResponseData `json:"data,required"` JSON blockGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*BlockGetResponse) UnmarshalJSON ¶
func (r *BlockGetResponse) UnmarshalJSON(data []byte) (err error)
type BlockGetResponseData ¶
type BlockGetResponseData struct { Entry BlockGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON blockGetResponseDataJSON `json:"-"` }
func (*BlockGetResponseData) UnmarshalJSON ¶
func (r *BlockGetResponseData) UnmarshalJSON(data []byte) (err error)
type BlockGetResponseDataEntry ¶
type BlockGetResponseDataEntry struct { ID string `json:"id,required"` Configurations []BlockGetResponseDataEntryConfiguration `json:"configurations,required"` JSON blockGetResponseDataEntryJSON `json:"-"` }
func (*BlockGetResponseDataEntry) UnmarshalJSON ¶
func (r *BlockGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type BlockGetResponseDataEntryConfiguration ¶
type BlockGetResponseDataEntryConfiguration struct { ActiveServiceIDs []string `json:"activeServiceIds,required"` Trips []BlockGetResponseDataEntryConfigurationsTrip `json:"trips,required"` InactiveServiceIDs []string `json:"inactiveServiceIds"` JSON blockGetResponseDataEntryConfigurationJSON `json:"-"` }
func (*BlockGetResponseDataEntryConfiguration) UnmarshalJSON ¶
func (r *BlockGetResponseDataEntryConfiguration) UnmarshalJSON(data []byte) (err error)
type BlockGetResponseDataEntryConfigurationsTrip ¶
type BlockGetResponseDataEntryConfigurationsTrip struct { AccumulatedSlackTime float64 `json:"accumulatedSlackTime,required"` BlockStopTimes []BlockGetResponseDataEntryConfigurationsTripsBlockStopTime `json:"blockStopTimes,required"` DistanceAlongBlock float64 `json:"distanceAlongBlock,required"` TripID string `json:"tripId,required"` JSON blockGetResponseDataEntryConfigurationsTripJSON `json:"-"` }
func (*BlockGetResponseDataEntryConfigurationsTrip) UnmarshalJSON ¶
func (r *BlockGetResponseDataEntryConfigurationsTrip) UnmarshalJSON(data []byte) (err error)
type BlockGetResponseDataEntryConfigurationsTripsBlockStopTime ¶
type BlockGetResponseDataEntryConfigurationsTripsBlockStopTime struct { AccumulatedSlackTime float64 `json:"accumulatedSlackTime,required"` BlockSequence int64 `json:"blockSequence,required"` DistanceAlongBlock float64 `json:"distanceAlongBlock,required"` StopTime BlockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTime `json:"stopTime,required"` JSON blockGetResponseDataEntryConfigurationsTripsBlockStopTimeJSON `json:"-"` }
func (*BlockGetResponseDataEntryConfigurationsTripsBlockStopTime) UnmarshalJSON ¶
func (r *BlockGetResponseDataEntryConfigurationsTripsBlockStopTime) UnmarshalJSON(data []byte) (err error)
type BlockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTime ¶
type BlockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTime struct { ArrivalTime int64 `json:"arrivalTime,required"` DepartureTime int64 `json:"departureTime,required"` StopID string `json:"stopId,required"` DropOffType int64 `json:"dropOffType"` PickupType int64 `json:"pickupType"` JSON blockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTimeJSON `json:"-"` }
func (*BlockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTime) UnmarshalJSON ¶
func (r *BlockGetResponseDataEntryConfigurationsTripsBlockStopTimesStopTime) UnmarshalJSON(data []byte) (err error)
type BlockService ¶
type BlockService struct {
Options []option.RequestOption
}
BlockService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockService method instead.
func NewBlockService ¶
func NewBlockService(opts ...option.RequestOption) (r *BlockService)
NewBlockService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockService) Get ¶
func (r *BlockService) Get(ctx context.Context, blockID string, opts ...option.RequestOption) (res *BlockGetResponse, err error)
Get details of a specific block by ID
type Client ¶
type Client struct { Options []option.RequestOption AgenciesWithCoverage *AgenciesWithCoverageService Agency *AgencyService VehiclesForAgency *VehiclesForAgencyService Config *ConfigService CurrentTime *CurrentTimeService StopsForLocation *StopsForLocationService StopsForRoute *StopsForRouteService StopsForAgency *StopsForAgencyService Stop *StopService StopIDsForAgency *StopIDsForAgencyService ScheduleForStop *ScheduleForStopService Route *RouteService RouteIDsForAgency *RouteIDsForAgencyService RoutesForLocation *RoutesForLocationService RoutesForAgency *RoutesForAgencyService ScheduleForRoute *ScheduleForRouteService ArrivalAndDeparture *ArrivalAndDepartureService Trip *TripService TripsForLocation *TripsForLocationService TripDetails *TripDetailService TripForVehicle *TripForVehicleService TripsForRoute *TripsForRouteService ReportProblemWithStop *ReportProblemWithStopService ReportProblemWithTrip *ReportProblemWithTripService SearchForStop *SearchForStopService SearchForRoute *SearchForRouteService Block *BlockService Shape *ShapeService }
Client creates a struct with services and top level methods that help with interacting with the onebusaway-sdk API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (ONEBUSAWAY_API_KEY, ONEBUSAWAY_SDK_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type ConfigGetResponse ¶
type ConfigGetResponse struct { Data ConfigGetResponseData `json:"data,required"` JSON configGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*ConfigGetResponse) UnmarshalJSON ¶
func (r *ConfigGetResponse) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseData ¶
type ConfigGetResponseData struct { Entry ConfigGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON configGetResponseDataJSON `json:"-"` }
func (*ConfigGetResponseData) UnmarshalJSON ¶
func (r *ConfigGetResponseData) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseDataEntry ¶
type ConfigGetResponseDataEntry struct { ID string `json:"id"` GitProperties ConfigGetResponseDataEntryGitProperties `json:"gitProperties"` Name string `json:"name"` ServiceDateFrom string `json:"serviceDateFrom"` ServiceDateTo string `json:"serviceDateTo"` JSON configGetResponseDataEntryJSON `json:"-"` }
func (*ConfigGetResponseDataEntry) UnmarshalJSON ¶
func (r *ConfigGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseDataEntryGitProperties ¶
type ConfigGetResponseDataEntryGitProperties struct { GitBranch string `json:"git.branch"` GitBuildHost string `json:"git.build.host"` GitBuildTime string `json:"git.build.time"` GitBuildUserEmail string `json:"git.build.user.email"` GitBuildUserName string `json:"git.build.user.name"` GitBuildVersion string `json:"git.build.version"` GitClosestTagCommitCount string `json:"git.closest.tag.commit.count"` GitClosestTagName string `json:"git.closest.tag.name"` GitCommitID string `json:"git.commit.id"` GitCommitIDAbbrev string `json:"git.commit.id.abbrev"` GitCommitIDDescribe string `json:"git.commit.id.describe"` GitCommitIDDescribeShort string `json:"git.commit.id.describe-short"` GitCommitMessageFull string `json:"git.commit.message.full"` GitCommitMessageShort string `json:"git.commit.message.short"` GitCommitTime string `json:"git.commit.time"` GitCommitUserEmail string `json:"git.commit.user.email"` GitCommitUserName string `json:"git.commit.user.name"` GitDirty string `json:"git.dirty"` GitRemoteOriginURL string `json:"git.remote.origin.url"` GitTags string `json:"git.tags"` JSON configGetResponseDataEntryGitPropertiesJSON `json:"-"` }
func (*ConfigGetResponseDataEntryGitProperties) UnmarshalJSON ¶
func (r *ConfigGetResponseDataEntryGitProperties) UnmarshalJSON(data []byte) (err error)
type ConfigService ¶
type ConfigService struct {
Options []option.RequestOption
}
ConfigService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConfigService method instead.
func NewConfigService ¶
func NewConfigService(opts ...option.RequestOption) (r *ConfigService)
NewConfigService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConfigService) Get ¶
func (r *ConfigService) Get(ctx context.Context, opts ...option.RequestOption) (res *ConfigGetResponse, err error)
config
type CurrentTimeGetResponse ¶
type CurrentTimeGetResponse struct { Data CurrentTimeGetResponseData `json:"data,required"` JSON currentTimeGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*CurrentTimeGetResponse) UnmarshalJSON ¶
func (r *CurrentTimeGetResponse) UnmarshalJSON(data []byte) (err error)
type CurrentTimeGetResponseData ¶
type CurrentTimeGetResponseData struct { Entry CurrentTimeGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON currentTimeGetResponseDataJSON `json:"-"` }
func (*CurrentTimeGetResponseData) UnmarshalJSON ¶
func (r *CurrentTimeGetResponseData) UnmarshalJSON(data []byte) (err error)
type CurrentTimeGetResponseDataEntry ¶
type CurrentTimeGetResponseDataEntry struct { ReadableTime string `json:"readableTime"` Time int64 `json:"time"` JSON currentTimeGetResponseDataEntryJSON `json:"-"` }
func (*CurrentTimeGetResponseDataEntry) UnmarshalJSON ¶
func (r *CurrentTimeGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type CurrentTimeService ¶
type CurrentTimeService struct {
Options []option.RequestOption
}
CurrentTimeService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCurrentTimeService method instead.
func NewCurrentTimeService ¶
func NewCurrentTimeService(opts ...option.RequestOption) (r *CurrentTimeService)
NewCurrentTimeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CurrentTimeService) Get ¶
func (r *CurrentTimeService) Get(ctx context.Context, opts ...option.RequestOption) (res *CurrentTimeGetResponse, err error)
current-time
type ReferencesAgency ¶
type ReferencesAgency = shared.ReferencesAgency
This is an alias to an internal type.
type ReferencesRoute ¶
type ReferencesRoute = shared.ReferencesRoute
This is an alias to an internal type.
type ReferencesSituation ¶
type ReferencesSituation = shared.ReferencesSituation
This is an alias to an internal type.
type ReferencesSituationsActiveWindow ¶
type ReferencesSituationsActiveWindow = shared.ReferencesSituationsActiveWindow
This is an alias to an internal type.
type ReferencesSituationsAllAffect ¶
type ReferencesSituationsAllAffect = shared.ReferencesSituationsAllAffect
This is an alias to an internal type.
type ReferencesSituationsConsequence ¶
type ReferencesSituationsConsequence = shared.ReferencesSituationsConsequence
This is an alias to an internal type.
type ReferencesSituationsConsequencesConditionDetails ¶
type ReferencesSituationsConsequencesConditionDetails = shared.ReferencesSituationsConsequencesConditionDetails
This is an alias to an internal type.
type ReferencesSituationsConsequencesConditionDetailsDiversionPath ¶
type ReferencesSituationsConsequencesConditionDetailsDiversionPath = shared.ReferencesSituationsConsequencesConditionDetailsDiversionPath
This is an alias to an internal type.
type ReferencesSituationsDescription ¶
type ReferencesSituationsDescription = shared.ReferencesSituationsDescription
This is an alias to an internal type.
type ReferencesSituationsPublicationWindow ¶
type ReferencesSituationsPublicationWindow = shared.ReferencesSituationsPublicationWindow
This is an alias to an internal type.
type ReferencesSituationsReason ¶
type ReferencesSituationsReason = shared.ReferencesSituationsReason
Reason for the service alert, taken from TPEG codes.
This is an alias to an internal type.
type ReferencesSituationsSummary ¶
type ReferencesSituationsSummary = shared.ReferencesSituationsSummary
This is an alias to an internal type.
type ReferencesSituationsURL ¶
type ReferencesSituationsURL = shared.ReferencesSituationsURL
This is an alias to an internal type.
type ReferencesStop ¶
type ReferencesStop = shared.ReferencesStop
This is an alias to an internal type.
type ReferencesStopTime ¶
type ReferencesStopTime = shared.ReferencesStopTime
This is an alias to an internal type.
type ReferencesTrip ¶
type ReferencesTrip = shared.ReferencesTrip
This is an alias to an internal type.
type ReportProblemWithStopGetParams ¶
type ReportProblemWithStopGetParams struct { // A string code identifying the nature of the problem Code param.Field[ReportProblemWithStopGetParamsCode] `query:"code"` // Additional comment text supplied by the user describing the problem UserComment param.Field[string] `query:"userComment"` // The reporting user’s current latitude UserLat param.Field[float64] `query:"userLat"` // The reporting user’s location accuracy, in meters UserLocationAccuracy param.Field[float64] `query:"userLocationAccuracy"` // The reporting user’s current longitude UserLon param.Field[float64] `query:"userLon"` }
func (ReportProblemWithStopGetParams) URLQuery ¶
func (r ReportProblemWithStopGetParams) URLQuery() (v url.Values)
URLQuery serializes ReportProblemWithStopGetParams's query parameters as `url.Values`.
type ReportProblemWithStopGetParamsCode ¶
type ReportProblemWithStopGetParamsCode string
A string code identifying the nature of the problem
const ( ReportProblemWithStopGetParamsCodeStopNameWrong ReportProblemWithStopGetParamsCode = "stop_name_wrong" ReportProblemWithStopGetParamsCodeStopNumberWrong ReportProblemWithStopGetParamsCode = "stop_number_wrong" ReportProblemWithStopGetParamsCodeStopLocationWrong ReportProblemWithStopGetParamsCode = "stop_location_wrong" ReportProblemWithStopGetParamsCodeRouteOrTripMissing ReportProblemWithStopGetParamsCode = "route_or_trip_missing" ReportProblemWithStopGetParamsCodeOther ReportProblemWithStopGetParamsCode = "other" )
func (ReportProblemWithStopGetParamsCode) IsKnown ¶
func (r ReportProblemWithStopGetParamsCode) IsKnown() bool
type ReportProblemWithStopService ¶
type ReportProblemWithStopService struct {
Options []option.RequestOption
}
ReportProblemWithStopService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReportProblemWithStopService method instead.
func NewReportProblemWithStopService ¶
func NewReportProblemWithStopService(opts ...option.RequestOption) (r *ReportProblemWithStopService)
NewReportProblemWithStopService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ReportProblemWithStopService) Get ¶
func (r *ReportProblemWithStopService) Get(ctx context.Context, stopID string, query ReportProblemWithStopGetParams, opts ...option.RequestOption) (res *shared.ResponseWrapper, err error)
Submit a user-generated problem report for a stop
type ReportProblemWithTripGetParams ¶
type ReportProblemWithTripGetParams struct { // A string code identifying the nature of the problem Code param.Field[ReportProblemWithTripGetParamsCode] `query:"code"` // The service date of the trip ServiceDate param.Field[int64] `query:"serviceDate"` // A stop ID indicating where the user is experiencing the problem StopID param.Field[string] `query:"stopID"` // Additional comment text supplied by the user describing the problem UserComment param.Field[string] `query:"userComment"` // The reporting user’s current latitude UserLat param.Field[float64] `query:"userLat"` // The reporting user’s location accuracy, in meters UserLocationAccuracy param.Field[float64] `query:"userLocationAccuracy"` // The reporting user’s current longitude UserLon param.Field[float64] `query:"userLon"` // Indicator if the user is on the transit vehicle experiencing the problem UserOnVehicle param.Field[bool] `query:"userOnVehicle"` // The vehicle number, as reported by the user UserVehicleNumber param.Field[string] `query:"userVehicleNumber"` // The vehicle actively serving the trip VehicleID param.Field[string] `query:"vehicleID"` }
func (ReportProblemWithTripGetParams) URLQuery ¶
func (r ReportProblemWithTripGetParams) URLQuery() (v url.Values)
URLQuery serializes ReportProblemWithTripGetParams's query parameters as `url.Values`.
type ReportProblemWithTripGetParamsCode ¶
type ReportProblemWithTripGetParamsCode string
A string code identifying the nature of the problem
const ( ReportProblemWithTripGetParamsCodeVehicleNeverCame ReportProblemWithTripGetParamsCode = "vehicle_never_came" ReportProblemWithTripGetParamsCodeVehicleCameEarly ReportProblemWithTripGetParamsCode = "vehicle_came_early" ReportProblemWithTripGetParamsCodeVehicleCameLate ReportProblemWithTripGetParamsCode = "vehicle_came_late" ReportProblemWithTripGetParamsCodeWrongHeadsign ReportProblemWithTripGetParamsCode = "wrong_headsign" ReportProblemWithTripGetParamsCodeVehicleDoesNotStopHere ReportProblemWithTripGetParamsCode = "vehicle_does_not_stop_here" ReportProblemWithTripGetParamsCodeOther ReportProblemWithTripGetParamsCode = "other" )
func (ReportProblemWithTripGetParamsCode) IsKnown ¶
func (r ReportProblemWithTripGetParamsCode) IsKnown() bool
type ReportProblemWithTripService ¶
type ReportProblemWithTripService struct {
Options []option.RequestOption
}
ReportProblemWithTripService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReportProblemWithTripService method instead.
func NewReportProblemWithTripService ¶
func NewReportProblemWithTripService(opts ...option.RequestOption) (r *ReportProblemWithTripService)
NewReportProblemWithTripService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ReportProblemWithTripService) Get ¶
func (r *ReportProblemWithTripService) Get(ctx context.Context, tripID string, query ReportProblemWithTripGetParams, opts ...option.RequestOption) (res *shared.ResponseWrapper, err error)
Submit a user-generated problem report for a particular trip.
type ResponseWrapper ¶
type ResponseWrapper = shared.ResponseWrapper
This is an alias to an internal type.
type RouteGetResponse ¶
type RouteGetResponse struct { Data RouteGetResponseData `json:"data,required"` JSON routeGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*RouteGetResponse) UnmarshalJSON ¶
func (r *RouteGetResponse) UnmarshalJSON(data []byte) (err error)
type RouteGetResponseData ¶
type RouteGetResponseData struct { Entry RouteGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON routeGetResponseDataJSON `json:"-"` }
func (*RouteGetResponseData) UnmarshalJSON ¶
func (r *RouteGetResponseData) UnmarshalJSON(data []byte) (err error)
type RouteGetResponseDataEntry ¶
type RouteGetResponseDataEntry struct { ID string `json:"id,required"` AgencyID string `json:"agencyId,required"` Type int64 `json:"type,required"` Color string `json:"color"` Description string `json:"description"` LongName string `json:"longName"` NullSafeShortName string `json:"nullSafeShortName"` ShortName string `json:"shortName"` TextColor string `json:"textColor"` URL string `json:"url"` JSON routeGetResponseDataEntryJSON `json:"-"` }
func (*RouteGetResponseDataEntry) UnmarshalJSON ¶
func (r *RouteGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type RouteIDsForAgencyListResponse ¶
type RouteIDsForAgencyListResponse struct { Data RouteIDsForAgencyListResponseData `json:"data,required"` JSON routeIDsForAgencyListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*RouteIDsForAgencyListResponse) UnmarshalJSON ¶
func (r *RouteIDsForAgencyListResponse) UnmarshalJSON(data []byte) (err error)
type RouteIDsForAgencyListResponseData ¶
type RouteIDsForAgencyListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []string `json:"list,required"` References shared.References `json:"references,required"` JSON routeIDsForAgencyListResponseDataJSON `json:"-"` }
func (*RouteIDsForAgencyListResponseData) UnmarshalJSON ¶
func (r *RouteIDsForAgencyListResponseData) UnmarshalJSON(data []byte) (err error)
type RouteIDsForAgencyService ¶
type RouteIDsForAgencyService struct {
Options []option.RequestOption
}
RouteIDsForAgencyService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRouteIDsForAgencyService method instead.
func NewRouteIDsForAgencyService ¶
func NewRouteIDsForAgencyService(opts ...option.RequestOption) (r *RouteIDsForAgencyService)
NewRouteIDsForAgencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RouteIDsForAgencyService) List ¶
func (r *RouteIDsForAgencyService) List(ctx context.Context, agencyID string, opts ...option.RequestOption) (res *RouteIDsForAgencyListResponse, err error)
Get route IDs for a specific agency
type RouteService ¶
type RouteService struct {
Options []option.RequestOption
}
RouteService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRouteService method instead.
func NewRouteService ¶
func NewRouteService(opts ...option.RequestOption) (r *RouteService)
NewRouteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RouteService) Get ¶
func (r *RouteService) Get(ctx context.Context, routeID string, opts ...option.RequestOption) (res *RouteGetResponse, err error)
Retrieve information for a specific route identified by its unique ID.
type RoutesForAgencyListResponse ¶
type RoutesForAgencyListResponse struct { Data RoutesForAgencyListResponseData `json:"data,required"` JSON routesForAgencyListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*RoutesForAgencyListResponse) UnmarshalJSON ¶
func (r *RoutesForAgencyListResponse) UnmarshalJSON(data []byte) (err error)
type RoutesForAgencyListResponseData ¶
type RoutesForAgencyListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []RoutesForAgencyListResponseDataList `json:"list,required"` References shared.References `json:"references,required"` JSON routesForAgencyListResponseDataJSON `json:"-"` }
func (*RoutesForAgencyListResponseData) UnmarshalJSON ¶
func (r *RoutesForAgencyListResponseData) UnmarshalJSON(data []byte) (err error)
type RoutesForAgencyListResponseDataList ¶
type RoutesForAgencyListResponseDataList struct { ID string `json:"id,required"` AgencyID string `json:"agencyId,required"` Type int64 `json:"type,required"` Color string `json:"color"` Description string `json:"description"` LongName string `json:"longName"` NullSafeShortName string `json:"nullSafeShortName"` ShortName string `json:"shortName"` TextColor string `json:"textColor"` URL string `json:"url"` JSON routesForAgencyListResponseDataListJSON `json:"-"` }
func (*RoutesForAgencyListResponseDataList) UnmarshalJSON ¶
func (r *RoutesForAgencyListResponseDataList) UnmarshalJSON(data []byte) (err error)
type RoutesForAgencyService ¶
type RoutesForAgencyService struct {
Options []option.RequestOption
}
RoutesForAgencyService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRoutesForAgencyService method instead.
func NewRoutesForAgencyService ¶
func NewRoutesForAgencyService(opts ...option.RequestOption) (r *RoutesForAgencyService)
NewRoutesForAgencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RoutesForAgencyService) List ¶
func (r *RoutesForAgencyService) List(ctx context.Context, agencyID string, opts ...option.RequestOption) (res *RoutesForAgencyListResponse, err error)
Retrieve the list of all routes for a particular agency by id
type RoutesForLocationListParams ¶
type RoutesForLocationListParams struct { Lat param.Field[float64] `query:"lat,required"` Lon param.Field[float64] `query:"lon,required"` LatSpan param.Field[float64] `query:"latSpan"` LonSpan param.Field[float64] `query:"lonSpan"` Query param.Field[string] `query:"query"` Radius param.Field[float64] `query:"radius"` }
func (RoutesForLocationListParams) URLQuery ¶
func (r RoutesForLocationListParams) URLQuery() (v url.Values)
URLQuery serializes RoutesForLocationListParams's query parameters as `url.Values`.
type RoutesForLocationListResponse ¶
type RoutesForLocationListResponse struct { Data RoutesForLocationListResponseData `json:"data,required"` JSON routesForLocationListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*RoutesForLocationListResponse) UnmarshalJSON ¶
func (r *RoutesForLocationListResponse) UnmarshalJSON(data []byte) (err error)
type RoutesForLocationListResponseData ¶
type RoutesForLocationListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []RoutesForLocationListResponseDataList `json:"list,required"` OutOfRange bool `json:"outOfRange,required"` References shared.References `json:"references,required"` JSON routesForLocationListResponseDataJSON `json:"-"` }
func (*RoutesForLocationListResponseData) UnmarshalJSON ¶
func (r *RoutesForLocationListResponseData) UnmarshalJSON(data []byte) (err error)
type RoutesForLocationListResponseDataList ¶
type RoutesForLocationListResponseDataList struct { ID string `json:"id,required"` AgencyID string `json:"agencyId,required"` Type int64 `json:"type,required"` Color string `json:"color"` Description string `json:"description"` LongName string `json:"longName"` NullSafeShortName string `json:"nullSafeShortName"` ShortName string `json:"shortName"` TextColor string `json:"textColor"` URL string `json:"url"` JSON routesForLocationListResponseDataListJSON `json:"-"` }
func (*RoutesForLocationListResponseDataList) UnmarshalJSON ¶
func (r *RoutesForLocationListResponseDataList) UnmarshalJSON(data []byte) (err error)
type RoutesForLocationService ¶
type RoutesForLocationService struct {
Options []option.RequestOption
}
RoutesForLocationService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRoutesForLocationService method instead.
func NewRoutesForLocationService ¶
func NewRoutesForLocationService(opts ...option.RequestOption) (r *RoutesForLocationService)
NewRoutesForLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RoutesForLocationService) List ¶
func (r *RoutesForLocationService) List(ctx context.Context, query RoutesForLocationListParams, opts ...option.RequestOption) (res *RoutesForLocationListResponse, err error)
routes-for-location
type ScheduleForRouteGetParams ¶
type ScheduleForRouteGetParams struct { // The date for which you want to request a schedule in the format YYYY-MM-DD // (optional, defaults to current date) Date param.Field[time.Time] `query:"date" format:"date"` }
func (ScheduleForRouteGetParams) URLQuery ¶
func (r ScheduleForRouteGetParams) URLQuery() (v url.Values)
URLQuery serializes ScheduleForRouteGetParams's query parameters as `url.Values`.
type ScheduleForRouteGetResponse ¶
type ScheduleForRouteGetResponse struct { Data ScheduleForRouteGetResponseData `json:"data,required"` JSON scheduleForRouteGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*ScheduleForRouteGetResponse) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponse) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseData ¶
type ScheduleForRouteGetResponseData struct { Entry ScheduleForRouteGetResponseDataEntry `json:"entry,required"` JSON scheduleForRouteGetResponseDataJSON `json:"-"` }
func (*ScheduleForRouteGetResponseData) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseData) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseDataEntry ¶
type ScheduleForRouteGetResponseDataEntry struct { RouteID string `json:"routeId,required"` ScheduleDate int64 `json:"scheduleDate,required"` ServiceIDs []string `json:"serviceIds,required"` Stops []ScheduleForRouteGetResponseDataEntryStop `json:"stops,required"` StopTripGroupings []ScheduleForRouteGetResponseDataEntryStopTripGrouping `json:"stopTripGroupings,required"` Trips []ScheduleForRouteGetResponseDataEntryTrip `json:"trips,required"` JSON scheduleForRouteGetResponseDataEntryJSON `json:"-"` }
func (*ScheduleForRouteGetResponseDataEntry) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseDataEntryStop ¶
type ScheduleForRouteGetResponseDataEntryStop struct { ID string `json:"id,required"` Lat float64 `json:"lat,required"` LocationType int64 `json:"locationType,required"` Lon float64 `json:"lon,required"` Name string `json:"name,required"` Parent string `json:"parent,required"` RouteIDs []string `json:"routeIds,required"` StaticRouteIDs []string `json:"staticRouteIds,required"` Code string `json:"code"` Direction string `json:"direction"` WheelchairBoarding string `json:"wheelchairBoarding"` JSON scheduleForRouteGetResponseDataEntryStopJSON `json:"-"` }
func (*ScheduleForRouteGetResponseDataEntryStop) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseDataEntryStop) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseDataEntryStopTripGrouping ¶
type ScheduleForRouteGetResponseDataEntryStopTripGrouping struct { DirectionID string `json:"directionId,required"` StopIDs []string `json:"stopIds,required"` TripHeadsigns []string `json:"tripHeadsigns,required"` TripIDs []string `json:"tripIds,required"` TripsWithStopTimes []ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTime `json:"tripsWithStopTimes"` JSON scheduleForRouteGetResponseDataEntryStopTripGroupingJSON `json:"-"` }
func (*ScheduleForRouteGetResponseDataEntryStopTripGrouping) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseDataEntryStopTripGrouping) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTime ¶
type ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTime struct { StopTimes []ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTime `json:"stopTimes,required"` TripID string `json:"tripId,required"` JSON scheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimeJSON `json:"-"` }
func (*ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTime) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTime) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTime ¶
type ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTime struct { ArrivalEnabled bool `json:"arrivalEnabled,required"` ArrivalTime int64 `json:"arrivalTime,required"` DepartureEnabled bool `json:"departureEnabled,required"` DepartureTime int64 `json:"departureTime,required"` StopID string `json:"stopId,required"` TripID string `json:"tripId,required"` ServiceID string `json:"serviceId"` StopHeadsign string `json:"stopHeadsign"` JSON scheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTimeJSON `json:"-"` }
func (*ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTime) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseDataEntryStopTripGroupingsTripsWithStopTimesStopTime) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteGetResponseDataEntryTrip ¶
type ScheduleForRouteGetResponseDataEntryTrip struct { ID string `json:"id,required"` RouteID string `json:"routeId,required"` ServiceID string `json:"serviceId,required"` BlockID string `json:"blockId"` DirectionID string `json:"directionId"` PeakOffpeak int64 `json:"peakOffpeak"` RouteShortName string `json:"routeShortName"` ShapeID string `json:"shapeId"` TimeZone string `json:"timeZone"` TripHeadsign string `json:"tripHeadsign"` TripShortName string `json:"tripShortName"` JSON scheduleForRouteGetResponseDataEntryTripJSON `json:"-"` }
func (*ScheduleForRouteGetResponseDataEntryTrip) UnmarshalJSON ¶
func (r *ScheduleForRouteGetResponseDataEntryTrip) UnmarshalJSON(data []byte) (err error)
type ScheduleForRouteService ¶
type ScheduleForRouteService struct {
Options []option.RequestOption
}
ScheduleForRouteService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewScheduleForRouteService method instead.
func NewScheduleForRouteService ¶
func NewScheduleForRouteService(opts ...option.RequestOption) (r *ScheduleForRouteService)
NewScheduleForRouteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ScheduleForRouteService) Get ¶
func (r *ScheduleForRouteService) Get(ctx context.Context, routeID string, query ScheduleForRouteGetParams, opts ...option.RequestOption) (res *ScheduleForRouteGetResponse, err error)
Retrieve the full schedule for a route on a particular day
type ScheduleForStopGetParams ¶
type ScheduleForStopGetParams struct { // The date for which you want to request a schedule in the format YYYY-MM-DD // (optional, defaults to the current date) Date param.Field[time.Time] `query:"date" format:"date"` }
func (ScheduleForStopGetParams) URLQuery ¶
func (r ScheduleForStopGetParams) URLQuery() (v url.Values)
URLQuery serializes ScheduleForStopGetParams's query parameters as `url.Values`.
type ScheduleForStopGetResponse ¶
type ScheduleForStopGetResponse struct { Data ScheduleForStopGetResponseData `json:"data,required"` JSON scheduleForStopGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*ScheduleForStopGetResponse) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponse) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopGetResponseData ¶
type ScheduleForStopGetResponseData struct { Entry ScheduleForStopGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON scheduleForStopGetResponseDataJSON `json:"-"` }
func (*ScheduleForStopGetResponseData) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponseData) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopGetResponseDataEntry ¶
type ScheduleForStopGetResponseDataEntry struct { Date int64 `json:"date,required"` StopID string `json:"stopId,required"` StopRouteSchedules []ScheduleForStopGetResponseDataEntryStopRouteSchedule `json:"stopRouteSchedules,required"` JSON scheduleForStopGetResponseDataEntryJSON `json:"-"` }
func (*ScheduleForStopGetResponseDataEntry) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopGetResponseDataEntryStopRouteSchedule ¶
type ScheduleForStopGetResponseDataEntryStopRouteSchedule struct { RouteID string `json:"routeId,required"` StopRouteDirectionSchedules []ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedule `json:"stopRouteDirectionSchedules,required"` JSON scheduleForStopGetResponseDataEntryStopRouteScheduleJSON `json:"-"` }
func (*ScheduleForStopGetResponseDataEntryStopRouteSchedule) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponseDataEntryStopRouteSchedule) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedule ¶
type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedule struct { ScheduleStopTimes []ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTime `json:"scheduleStopTimes,required"` TripHeadsign string `json:"tripHeadsign,required"` ScheduleFrequencies []ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequency `json:"scheduleFrequencies"` JSON scheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionScheduleJSON `json:"-"` }
func (*ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedule) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedule) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequency ¶
type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequency struct { EndTime int64 `json:"endTime,required"` Headway int64 `json:"headway,required"` ServiceDate int64 `json:"serviceDate,required"` ServiceID string `json:"serviceId,required"` StartTime int64 `json:"startTime,required"` TripID string `json:"tripId,required"` JSON scheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequencyJSON `json:"-"` }
func (*ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequency) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleFrequency) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTime ¶
type ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTime struct { ArrivalEnabled bool `json:"arrivalEnabled,required"` ArrivalTime int64 `json:"arrivalTime,required"` DepartureEnabled bool `json:"departureEnabled,required"` DepartureTime int64 `json:"departureTime,required"` ServiceID string `json:"serviceId,required"` TripID string `json:"tripId,required"` StopHeadsign string `json:"stopHeadsign"` JSON scheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTimeJSON `json:"-"` }
func (*ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTime) UnmarshalJSON ¶
func (r *ScheduleForStopGetResponseDataEntryStopRouteSchedulesStopRouteDirectionSchedulesScheduleStopTime) UnmarshalJSON(data []byte) (err error)
type ScheduleForStopService ¶
type ScheduleForStopService struct {
Options []option.RequestOption
}
ScheduleForStopService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewScheduleForStopService method instead.
func NewScheduleForStopService ¶
func NewScheduleForStopService(opts ...option.RequestOption) (r *ScheduleForStopService)
NewScheduleForStopService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ScheduleForStopService) Get ¶
func (r *ScheduleForStopService) Get(ctx context.Context, stopID string, query ScheduleForStopGetParams, opts ...option.RequestOption) (res *ScheduleForStopGetResponse, err error)
Get schedule for a specific stop
type SearchForRouteListParams ¶
type SearchForRouteListParams struct { // The string to search for. Input param.Field[string] `query:"input,required"` // The max number of results to return. Defaults to 20. MaxCount param.Field[int64] `query:"maxCount"` }
func (SearchForRouteListParams) URLQuery ¶
func (r SearchForRouteListParams) URLQuery() (v url.Values)
URLQuery serializes SearchForRouteListParams's query parameters as `url.Values`.
type SearchForRouteListResponse ¶
type SearchForRouteListResponse struct { Data SearchForRouteListResponseData `json:"data"` JSON searchForRouteListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*SearchForRouteListResponse) UnmarshalJSON ¶
func (r *SearchForRouteListResponse) UnmarshalJSON(data []byte) (err error)
type SearchForRouteListResponseData ¶
type SearchForRouteListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []SearchForRouteListResponseDataList `json:"list,required"` OutOfRange bool `json:"outOfRange,required"` References shared.References `json:"references,required"` JSON searchForRouteListResponseDataJSON `json:"-"` }
func (*SearchForRouteListResponseData) UnmarshalJSON ¶
func (r *SearchForRouteListResponseData) UnmarshalJSON(data []byte) (err error)
type SearchForRouteListResponseDataList ¶
type SearchForRouteListResponseDataList struct { ID string `json:"id,required"` AgencyID string `json:"agencyId,required"` Type int64 `json:"type,required"` Color string `json:"color"` Description string `json:"description"` LongName string `json:"longName"` NullSafeShortName string `json:"nullSafeShortName"` ShortName string `json:"shortName"` TextColor string `json:"textColor"` URL string `json:"url"` JSON searchForRouteListResponseDataListJSON `json:"-"` }
func (*SearchForRouteListResponseDataList) UnmarshalJSON ¶
func (r *SearchForRouteListResponseDataList) UnmarshalJSON(data []byte) (err error)
type SearchForRouteService ¶
type SearchForRouteService struct {
Options []option.RequestOption
}
SearchForRouteService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSearchForRouteService method instead.
func NewSearchForRouteService ¶
func NewSearchForRouteService(opts ...option.RequestOption) (r *SearchForRouteService)
NewSearchForRouteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SearchForRouteService) List ¶
func (r *SearchForRouteService) List(ctx context.Context, query SearchForRouteListParams, opts ...option.RequestOption) (res *SearchForRouteListResponse, err error)
Search for a route based on its name.
type SearchForStopListParams ¶
type SearchForStopListParams struct { // The string to search for. Input param.Field[string] `query:"input,required"` // The max number of results to return. Defaults to 20. MaxCount param.Field[int64] `query:"maxCount"` }
func (SearchForStopListParams) URLQuery ¶
func (r SearchForStopListParams) URLQuery() (v url.Values)
URLQuery serializes SearchForStopListParams's query parameters as `url.Values`.
type SearchForStopListResponse ¶
type SearchForStopListResponse struct { Data SearchForStopListResponseData `json:"data"` JSON searchForStopListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*SearchForStopListResponse) UnmarshalJSON ¶
func (r *SearchForStopListResponse) UnmarshalJSON(data []byte) (err error)
type SearchForStopListResponseData ¶
type SearchForStopListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []SearchForStopListResponseDataList `json:"list,required"` OutOfRange bool `json:"outOfRange,required"` References shared.References `json:"references,required"` JSON searchForStopListResponseDataJSON `json:"-"` }
func (*SearchForStopListResponseData) UnmarshalJSON ¶
func (r *SearchForStopListResponseData) UnmarshalJSON(data []byte) (err error)
type SearchForStopListResponseDataList ¶
type SearchForStopListResponseDataList struct { ID string `json:"id,required"` Lat float64 `json:"lat,required"` LocationType int64 `json:"locationType,required"` Lon float64 `json:"lon,required"` Name string `json:"name,required"` Parent string `json:"parent,required"` RouteIDs []string `json:"routeIds,required"` StaticRouteIDs []string `json:"staticRouteIds,required"` Code string `json:"code"` Direction string `json:"direction"` WheelchairBoarding string `json:"wheelchairBoarding"` JSON searchForStopListResponseDataListJSON `json:"-"` }
func (*SearchForStopListResponseDataList) UnmarshalJSON ¶
func (r *SearchForStopListResponseDataList) UnmarshalJSON(data []byte) (err error)
type SearchForStopService ¶
type SearchForStopService struct {
Options []option.RequestOption
}
SearchForStopService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSearchForStopService method instead.
func NewSearchForStopService ¶
func NewSearchForStopService(opts ...option.RequestOption) (r *SearchForStopService)
NewSearchForStopService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SearchForStopService) List ¶
func (r *SearchForStopService) List(ctx context.Context, query SearchForStopListParams, opts ...option.RequestOption) (res *SearchForStopListResponse, err error)
Search for a stop based on its name.
type ShapeGetResponse ¶
type ShapeGetResponse struct { Data ShapeGetResponseData `json:"data,required"` JSON shapeGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*ShapeGetResponse) UnmarshalJSON ¶
func (r *ShapeGetResponse) UnmarshalJSON(data []byte) (err error)
type ShapeGetResponseData ¶
type ShapeGetResponseData struct { Entry ShapeGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON shapeGetResponseDataJSON `json:"-"` }
func (*ShapeGetResponseData) UnmarshalJSON ¶
func (r *ShapeGetResponseData) UnmarshalJSON(data []byte) (err error)
type ShapeGetResponseDataEntry ¶
type ShapeGetResponseDataEntry struct { Length int64 `json:"length,required"` // Encoded polyline format representing the shape of the path Points string `json:"points,required"` Levels string `json:"levels"` JSON shapeGetResponseDataEntryJSON `json:"-"` }
func (*ShapeGetResponseDataEntry) UnmarshalJSON ¶
func (r *ShapeGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type ShapeService ¶
type ShapeService struct {
Options []option.RequestOption
}
ShapeService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewShapeService method instead.
func NewShapeService ¶
func NewShapeService(opts ...option.RequestOption) (r *ShapeService)
NewShapeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ShapeService) Get ¶
func (r *ShapeService) Get(ctx context.Context, shapeID string, opts ...option.RequestOption) (res *ShapeGetResponse, err error)
Retrieve a shape (the path traveled by a transit vehicle) by ID.
type StopGetResponse ¶
type StopGetResponse struct { Data StopGetResponseData `json:"data,required"` JSON stopGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*StopGetResponse) UnmarshalJSON ¶
func (r *StopGetResponse) UnmarshalJSON(data []byte) (err error)
type StopGetResponseData ¶
type StopGetResponseData struct { Entry StopGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON stopGetResponseDataJSON `json:"-"` }
func (*StopGetResponseData) UnmarshalJSON ¶
func (r *StopGetResponseData) UnmarshalJSON(data []byte) (err error)
type StopGetResponseDataEntry ¶
type StopGetResponseDataEntry struct { ID string `json:"id,required"` Lat float64 `json:"lat,required"` LocationType int64 `json:"locationType,required"` Lon float64 `json:"lon,required"` Name string `json:"name,required"` Parent string `json:"parent,required"` RouteIDs []string `json:"routeIds,required"` StaticRouteIDs []string `json:"staticRouteIds,required"` Code string `json:"code"` Direction string `json:"direction"` WheelchairBoarding string `json:"wheelchairBoarding"` JSON stopGetResponseDataEntryJSON `json:"-"` }
func (*StopGetResponseDataEntry) UnmarshalJSON ¶
func (r *StopGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type StopIDsForAgencyListResponse ¶
type StopIDsForAgencyListResponse struct { Data StopIDsForAgencyListResponseData `json:"data,required"` JSON stopIDsForAgencyListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*StopIDsForAgencyListResponse) UnmarshalJSON ¶
func (r *StopIDsForAgencyListResponse) UnmarshalJSON(data []byte) (err error)
type StopIDsForAgencyListResponseData ¶
type StopIDsForAgencyListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []string `json:"list,required"` References shared.References `json:"references,required"` JSON stopIDsForAgencyListResponseDataJSON `json:"-"` }
func (*StopIDsForAgencyListResponseData) UnmarshalJSON ¶
func (r *StopIDsForAgencyListResponseData) UnmarshalJSON(data []byte) (err error)
type StopIDsForAgencyService ¶
type StopIDsForAgencyService struct {
Options []option.RequestOption
}
StopIDsForAgencyService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStopIDsForAgencyService method instead.
func NewStopIDsForAgencyService ¶
func NewStopIDsForAgencyService(opts ...option.RequestOption) (r *StopIDsForAgencyService)
NewStopIDsForAgencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StopIDsForAgencyService) List ¶
func (r *StopIDsForAgencyService) List(ctx context.Context, agencyID string, opts ...option.RequestOption) (res *StopIDsForAgencyListResponse, err error)
Get stop IDs for a specific agency
type StopService ¶
type StopService struct {
Options []option.RequestOption
}
StopService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStopService method instead.
func NewStopService ¶
func NewStopService(opts ...option.RequestOption) (r *StopService)
NewStopService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StopService) Get ¶
func (r *StopService) Get(ctx context.Context, stopID string, opts ...option.RequestOption) (res *StopGetResponse, err error)
Get details of a specific stop
type StopsForAgencyListResponse ¶
type StopsForAgencyListResponse struct { LimitExceeded bool `json:"limitExceeded,required"` List []StopsForAgencyListResponseList `json:"list,required"` References shared.References `json:"references,required"` OutOfRange bool `json:"outOfRange"` JSON stopsForAgencyListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*StopsForAgencyListResponse) UnmarshalJSON ¶
func (r *StopsForAgencyListResponse) UnmarshalJSON(data []byte) (err error)
type StopsForAgencyListResponseList ¶
type StopsForAgencyListResponseList struct { ID string `json:"id,required"` Lat float64 `json:"lat,required"` LocationType int64 `json:"locationType,required"` Lon float64 `json:"lon,required"` Name string `json:"name,required"` Parent string `json:"parent,required"` RouteIDs []string `json:"routeIds,required"` StaticRouteIDs []string `json:"staticRouteIds,required"` Code string `json:"code"` Direction string `json:"direction"` WheelchairBoarding string `json:"wheelchairBoarding"` JSON stopsForAgencyListResponseListJSON `json:"-"` }
func (*StopsForAgencyListResponseList) UnmarshalJSON ¶
func (r *StopsForAgencyListResponseList) UnmarshalJSON(data []byte) (err error)
type StopsForAgencyService ¶
type StopsForAgencyService struct {
Options []option.RequestOption
}
StopsForAgencyService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStopsForAgencyService method instead.
func NewStopsForAgencyService ¶
func NewStopsForAgencyService(opts ...option.RequestOption) (r *StopsForAgencyService)
NewStopsForAgencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StopsForAgencyService) List ¶
func (r *StopsForAgencyService) List(ctx context.Context, agencyID string, opts ...option.RequestOption) (res *StopsForAgencyListResponse, err error)
Get stops for a specific agency
type StopsForLocationListParams ¶
type StopsForLocationListParams struct { Lat param.Field[float64] `query:"lat,required"` Lon param.Field[float64] `query:"lon,required"` // An alternative to radius to set the search bounding box (optional) LatSpan param.Field[float64] `query:"latSpan"` // An alternative to radius to set the search bounding box (optional) LonSpan param.Field[float64] `query:"lonSpan"` // A search query string to filter the results Query param.Field[string] `query:"query"` // The radius in meters to search within Radius param.Field[float64] `query:"radius"` }
func (StopsForLocationListParams) URLQuery ¶
func (r StopsForLocationListParams) URLQuery() (v url.Values)
URLQuery serializes StopsForLocationListParams's query parameters as `url.Values`.
type StopsForLocationListResponse ¶
type StopsForLocationListResponse struct { Data StopsForLocationListResponseData `json:"data,required"` JSON stopsForLocationListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*StopsForLocationListResponse) UnmarshalJSON ¶
func (r *StopsForLocationListResponse) UnmarshalJSON(data []byte) (err error)
type StopsForLocationListResponseData ¶
type StopsForLocationListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []StopsForLocationListResponseDataList `json:"list,required"` References shared.References `json:"references,required"` OutOfRange bool `json:"outOfRange"` JSON stopsForLocationListResponseDataJSON `json:"-"` }
func (*StopsForLocationListResponseData) UnmarshalJSON ¶
func (r *StopsForLocationListResponseData) UnmarshalJSON(data []byte) (err error)
type StopsForLocationListResponseDataList ¶
type StopsForLocationListResponseDataList struct { ID string `json:"id,required"` Lat float64 `json:"lat,required"` LocationType int64 `json:"locationType,required"` Lon float64 `json:"lon,required"` Name string `json:"name,required"` Parent string `json:"parent,required"` RouteIDs []string `json:"routeIds,required"` StaticRouteIDs []string `json:"staticRouteIds,required"` Code string `json:"code"` Direction string `json:"direction"` WheelchairBoarding string `json:"wheelchairBoarding"` JSON stopsForLocationListResponseDataListJSON `json:"-"` }
func (*StopsForLocationListResponseDataList) UnmarshalJSON ¶
func (r *StopsForLocationListResponseDataList) UnmarshalJSON(data []byte) (err error)
type StopsForLocationService ¶
type StopsForLocationService struct {
Options []option.RequestOption
}
StopsForLocationService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStopsForLocationService method instead.
func NewStopsForLocationService ¶
func NewStopsForLocationService(opts ...option.RequestOption) (r *StopsForLocationService)
NewStopsForLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StopsForLocationService) List ¶
func (r *StopsForLocationService) List(ctx context.Context, query StopsForLocationListParams, opts ...option.RequestOption) (res *StopsForLocationListResponse, err error)
stops-for-location
type StopsForRouteListParams ¶
type StopsForRouteListParams struct { // Include polyline elements in the response (default true) IncludePolylines param.Field[bool] `query:"includePolylines"` // Specify service date (YYYY-MM-DD or epoch) (default today) Time param.Field[string] `query:"time"` }
func (StopsForRouteListParams) URLQuery ¶
func (r StopsForRouteListParams) URLQuery() (v url.Values)
URLQuery serializes StopsForRouteListParams's query parameters as `url.Values`.
type StopsForRouteListResponse ¶
type StopsForRouteListResponse struct { Data StopsForRouteListResponseData `json:"data,required"` JSON stopsForRouteListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*StopsForRouteListResponse) UnmarshalJSON ¶
func (r *StopsForRouteListResponse) UnmarshalJSON(data []byte) (err error)
type StopsForRouteListResponseData ¶
type StopsForRouteListResponseData struct { Entry StopsForRouteListResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON stopsForRouteListResponseDataJSON `json:"-"` }
func (*StopsForRouteListResponseData) UnmarshalJSON ¶
func (r *StopsForRouteListResponseData) UnmarshalJSON(data []byte) (err error)
type StopsForRouteListResponseDataEntry ¶
type StopsForRouteListResponseDataEntry struct { Polylines []StopsForRouteListResponseDataEntryPolyline `json:"polylines"` RouteID string `json:"routeId"` StopGroupings []StopsForRouteListResponseDataEntryStopGrouping `json:"stopGroupings"` StopIDs []string `json:"stopIds"` JSON stopsForRouteListResponseDataEntryJSON `json:"-"` }
func (*StopsForRouteListResponseDataEntry) UnmarshalJSON ¶
func (r *StopsForRouteListResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type StopsForRouteListResponseDataEntryPolyline ¶
type StopsForRouteListResponseDataEntryPolyline struct { Length int64 `json:"length"` Levels string `json:"levels"` Points string `json:"points"` JSON stopsForRouteListResponseDataEntryPolylineJSON `json:"-"` }
func (*StopsForRouteListResponseDataEntryPolyline) UnmarshalJSON ¶
func (r *StopsForRouteListResponseDataEntryPolyline) UnmarshalJSON(data []byte) (err error)
type StopsForRouteListResponseDataEntryStopGrouping ¶
type StopsForRouteListResponseDataEntryStopGrouping struct { ID string `json:"id"` Name StopsForRouteListResponseDataEntryStopGroupingsName `json:"name"` Polylines []StopsForRouteListResponseDataEntryStopGroupingsPolyline `json:"polylines"` StopIDs []string `json:"stopIds"` JSON stopsForRouteListResponseDataEntryStopGroupingJSON `json:"-"` }
func (*StopsForRouteListResponseDataEntryStopGrouping) UnmarshalJSON ¶
func (r *StopsForRouteListResponseDataEntryStopGrouping) UnmarshalJSON(data []byte) (err error)
type StopsForRouteListResponseDataEntryStopGroupingsName ¶
type StopsForRouteListResponseDataEntryStopGroupingsName struct { Name string `json:"name"` Names []string `json:"names"` Type string `json:"type"` JSON stopsForRouteListResponseDataEntryStopGroupingsNameJSON `json:"-"` }
func (*StopsForRouteListResponseDataEntryStopGroupingsName) UnmarshalJSON ¶
func (r *StopsForRouteListResponseDataEntryStopGroupingsName) UnmarshalJSON(data []byte) (err error)
type StopsForRouteListResponseDataEntryStopGroupingsPolyline ¶
type StopsForRouteListResponseDataEntryStopGroupingsPolyline struct { Length int64 `json:"length"` Levels string `json:"levels"` Points string `json:"points"` JSON stopsForRouteListResponseDataEntryStopGroupingsPolylineJSON `json:"-"` }
func (*StopsForRouteListResponseDataEntryStopGroupingsPolyline) UnmarshalJSON ¶
func (r *StopsForRouteListResponseDataEntryStopGroupingsPolyline) UnmarshalJSON(data []byte) (err error)
type StopsForRouteService ¶
type StopsForRouteService struct {
Options []option.RequestOption
}
StopsForRouteService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStopsForRouteService method instead.
func NewStopsForRouteService ¶
func NewStopsForRouteService(opts ...option.RequestOption) (r *StopsForRouteService)
NewStopsForRouteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StopsForRouteService) List ¶
func (r *StopsForRouteService) List(ctx context.Context, routeID string, query StopsForRouteListParams, opts ...option.RequestOption) (res *StopsForRouteListResponse, err error)
Get stops for a specific route
type TripDetailGetParams ¶
type TripDetailGetParams struct { // Whether to include the full schedule element in the tripDetails section // (defaults to true). IncludeSchedule param.Field[bool] `query:"includeSchedule"` // Whether to include the full status element in the tripDetails section (defaults // to true). IncludeStatus param.Field[bool] `query:"includeStatus"` // Whether to include the full trip element in the references section (defaults to // true). IncludeTrip param.Field[bool] `query:"includeTrip"` // Service date for the trip as Unix time in milliseconds (optional). ServiceDate param.Field[int64] `query:"serviceDate"` // Time parameter to query the system at a specific time (optional). Time param.Field[int64] `query:"time"` }
func (TripDetailGetParams) URLQuery ¶
func (r TripDetailGetParams) URLQuery() (v url.Values)
URLQuery serializes TripDetailGetParams's query parameters as `url.Values`.
type TripDetailGetResponse ¶
type TripDetailGetResponse struct { Data TripDetailGetResponseData `json:"data,required"` JSON tripDetailGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*TripDetailGetResponse) UnmarshalJSON ¶
func (r *TripDetailGetResponse) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseData ¶
type TripDetailGetResponseData struct { Entry TripDetailGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON tripDetailGetResponseDataJSON `json:"-"` }
func (*TripDetailGetResponseData) UnmarshalJSON ¶
func (r *TripDetailGetResponseData) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseDataEntry ¶
type TripDetailGetResponseDataEntry struct { TripID string `json:"tripId,required"` Frequency string `json:"frequency,nullable"` Schedule TripDetailGetResponseDataEntrySchedule `json:"schedule"` ServiceDate int64 `json:"serviceDate"` SituationIDs []string `json:"situationIds"` Status TripDetailGetResponseDataEntryStatus `json:"status"` JSON tripDetailGetResponseDataEntryJSON `json:"-"` }
func (*TripDetailGetResponseDataEntry) UnmarshalJSON ¶
func (r *TripDetailGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseDataEntrySchedule ¶
type TripDetailGetResponseDataEntrySchedule struct { NextTripID string `json:"nextTripId,required"` PreviousTripID string `json:"previousTripId,required"` StopTimes []TripDetailGetResponseDataEntryScheduleStopTime `json:"stopTimes,required"` TimeZone string `json:"timeZone,required"` Frequency string `json:"frequency,nullable"` JSON tripDetailGetResponseDataEntryScheduleJSON `json:"-"` }
func (*TripDetailGetResponseDataEntrySchedule) UnmarshalJSON ¶
func (r *TripDetailGetResponseDataEntrySchedule) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseDataEntryScheduleStopTime ¶
type TripDetailGetResponseDataEntryScheduleStopTime struct { ArrivalTime int64 `json:"arrivalTime"` DepartureTime int64 `json:"departureTime"` DistanceAlongTrip float64 `json:"distanceAlongTrip"` HistoricalOccupancy string `json:"historicalOccupancy"` StopHeadsign string `json:"stopHeadsign"` StopID string `json:"stopId"` JSON tripDetailGetResponseDataEntryScheduleStopTimeJSON `json:"-"` }
func (*TripDetailGetResponseDataEntryScheduleStopTime) UnmarshalJSON ¶
func (r *TripDetailGetResponseDataEntryScheduleStopTime) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseDataEntryStatus ¶
type TripDetailGetResponseDataEntryStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation TripDetailGetResponseDataEntryStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position TripDetailGetResponseDataEntryStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON tripDetailGetResponseDataEntryStatusJSON `json:"-"` }
func (*TripDetailGetResponseDataEntryStatus) UnmarshalJSON ¶
func (r *TripDetailGetResponseDataEntryStatus) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseDataEntryStatusLastKnownLocation ¶
type TripDetailGetResponseDataEntryStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON tripDetailGetResponseDataEntryStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*TripDetailGetResponseDataEntryStatusLastKnownLocation) UnmarshalJSON ¶
func (r *TripDetailGetResponseDataEntryStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type TripDetailGetResponseDataEntryStatusPosition ¶
type TripDetailGetResponseDataEntryStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON tripDetailGetResponseDataEntryStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*TripDetailGetResponseDataEntryStatusPosition) UnmarshalJSON ¶
func (r *TripDetailGetResponseDataEntryStatusPosition) UnmarshalJSON(data []byte) (err error)
type TripDetailService ¶
type TripDetailService struct {
Options []option.RequestOption
}
TripDetailService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTripDetailService method instead.
func NewTripDetailService ¶
func NewTripDetailService(opts ...option.RequestOption) (r *TripDetailService)
NewTripDetailService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TripDetailService) Get ¶
func (r *TripDetailService) Get(ctx context.Context, tripID string, query TripDetailGetParams, opts ...option.RequestOption) (res *TripDetailGetResponse, err error)
Retrieve Trip Details
type TripForVehicleGetParams ¶
type TripForVehicleGetParams struct { // Determines whether full <schedule/> element is included in the <tripDetails/> // section. Defaults to false. IncludeSchedule param.Field[bool] `query:"includeSchedule"` // Determines whether the full <status/> element is included in the <tripDetails/> // section. Defaults to true. IncludeStatus param.Field[bool] `query:"includeStatus"` // Determines whether full <trip/> element is included in the <references/> // section. Defaults to false. IncludeTrip param.Field[bool] `query:"includeTrip"` // Time parameter to query the system at a specific time (optional). Time param.Field[int64] `query:"time"` }
func (TripForVehicleGetParams) URLQuery ¶
func (r TripForVehicleGetParams) URLQuery() (v url.Values)
URLQuery serializes TripForVehicleGetParams's query parameters as `url.Values`.
type TripForVehicleGetResponse ¶
type TripForVehicleGetResponse struct { Data TripForVehicleGetResponseData `json:"data,required"` JSON tripForVehicleGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*TripForVehicleGetResponse) UnmarshalJSON ¶
func (r *TripForVehicleGetResponse) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseData ¶
type TripForVehicleGetResponseData struct { Entry TripForVehicleGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON tripForVehicleGetResponseDataJSON `json:"-"` }
func (*TripForVehicleGetResponseData) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseData) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseDataEntry ¶
type TripForVehicleGetResponseDataEntry struct { TripID string `json:"tripId,required"` Frequency string `json:"frequency,nullable"` Schedule TripForVehicleGetResponseDataEntrySchedule `json:"schedule"` ServiceDate int64 `json:"serviceDate"` SituationIDs []string `json:"situationIds"` Status TripForVehicleGetResponseDataEntryStatus `json:"status"` JSON tripForVehicleGetResponseDataEntryJSON `json:"-"` }
func (*TripForVehicleGetResponseDataEntry) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseDataEntrySchedule ¶
type TripForVehicleGetResponseDataEntrySchedule struct { NextTripID string `json:"nextTripId,required"` PreviousTripID string `json:"previousTripId,required"` StopTimes []TripForVehicleGetResponseDataEntryScheduleStopTime `json:"stopTimes,required"` TimeZone string `json:"timeZone,required"` Frequency string `json:"frequency,nullable"` JSON tripForVehicleGetResponseDataEntryScheduleJSON `json:"-"` }
func (*TripForVehicleGetResponseDataEntrySchedule) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseDataEntrySchedule) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseDataEntryScheduleStopTime ¶
type TripForVehicleGetResponseDataEntryScheduleStopTime struct { ArrivalTime int64 `json:"arrivalTime"` DepartureTime int64 `json:"departureTime"` DistanceAlongTrip float64 `json:"distanceAlongTrip"` HistoricalOccupancy string `json:"historicalOccupancy"` StopHeadsign string `json:"stopHeadsign"` StopID string `json:"stopId"` JSON tripForVehicleGetResponseDataEntryScheduleStopTimeJSON `json:"-"` }
func (*TripForVehicleGetResponseDataEntryScheduleStopTime) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseDataEntryScheduleStopTime) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseDataEntryStatus ¶
type TripForVehicleGetResponseDataEntryStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation TripForVehicleGetResponseDataEntryStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position TripForVehicleGetResponseDataEntryStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON tripForVehicleGetResponseDataEntryStatusJSON `json:"-"` }
func (*TripForVehicleGetResponseDataEntryStatus) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseDataEntryStatus) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseDataEntryStatusLastKnownLocation ¶
type TripForVehicleGetResponseDataEntryStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON tripForVehicleGetResponseDataEntryStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*TripForVehicleGetResponseDataEntryStatusLastKnownLocation) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseDataEntryStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type TripForVehicleGetResponseDataEntryStatusPosition ¶
type TripForVehicleGetResponseDataEntryStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON tripForVehicleGetResponseDataEntryStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*TripForVehicleGetResponseDataEntryStatusPosition) UnmarshalJSON ¶
func (r *TripForVehicleGetResponseDataEntryStatusPosition) UnmarshalJSON(data []byte) (err error)
type TripForVehicleService ¶
type TripForVehicleService struct {
Options []option.RequestOption
}
TripForVehicleService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTripForVehicleService method instead.
func NewTripForVehicleService ¶
func NewTripForVehicleService(opts ...option.RequestOption) (r *TripForVehicleService)
NewTripForVehicleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TripForVehicleService) Get ¶
func (r *TripForVehicleService) Get(ctx context.Context, vehicleID string, query TripForVehicleGetParams, opts ...option.RequestOption) (res *TripForVehicleGetResponse, err error)
Retrieve trip for a specific vehicle
type TripGetResponse ¶
type TripGetResponse struct { Data TripGetResponseData `json:"data,required"` JSON tripGetResponseJSON `json:"-"` shared.ResponseWrapper }
func (*TripGetResponse) UnmarshalJSON ¶
func (r *TripGetResponse) UnmarshalJSON(data []byte) (err error)
type TripGetResponseData ¶
type TripGetResponseData struct { Entry TripGetResponseDataEntry `json:"entry,required"` References shared.References `json:"references,required"` JSON tripGetResponseDataJSON `json:"-"` }
func (*TripGetResponseData) UnmarshalJSON ¶
func (r *TripGetResponseData) UnmarshalJSON(data []byte) (err error)
type TripGetResponseDataEntry ¶
type TripGetResponseDataEntry struct { ID string `json:"id,required"` RouteID string `json:"routeId,required"` ServiceID string `json:"serviceId,required"` BlockID string `json:"blockId"` DirectionID string `json:"directionId"` PeakOffpeak int64 `json:"peakOffpeak"` RouteShortName string `json:"routeShortName"` ShapeID string `json:"shapeId"` TimeZone string `json:"timeZone"` TripHeadsign string `json:"tripHeadsign"` TripShortName string `json:"tripShortName"` JSON tripGetResponseDataEntryJSON `json:"-"` }
func (*TripGetResponseDataEntry) UnmarshalJSON ¶
func (r *TripGetResponseDataEntry) UnmarshalJSON(data []byte) (err error)
type TripService ¶
type TripService struct {
Options []option.RequestOption
}
TripService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTripService method instead.
func NewTripService ¶
func NewTripService(opts ...option.RequestOption) (r *TripService)
NewTripService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TripService) Get ¶
func (r *TripService) Get(ctx context.Context, tripID string, opts ...option.RequestOption) (res *TripGetResponse, err error)
Get details of a specific trip
type TripsForLocationListParams ¶
type TripsForLocationListParams struct { // The latitude coordinate of the search center Lat param.Field[float64] `query:"lat,required"` // Latitude span of the search bounding box LatSpan param.Field[float64] `query:"latSpan,required"` // The longitude coordinate of the search center Lon param.Field[float64] `query:"lon,required"` // Longitude span of the search bounding box LonSpan param.Field[float64] `query:"lonSpan,required"` // Whether to include full schedule elements in the tripDetails section. Defaults // to false. IncludeSchedule param.Field[bool] `query:"includeSchedule"` // Whether to include full trip elements in the references section. Defaults to // false. IncludeTrip param.Field[bool] `query:"includeTrip"` // Specific time for the query. Defaults to the current time. Time param.Field[int64] `query:"time"` }
func (TripsForLocationListParams) URLQuery ¶
func (r TripsForLocationListParams) URLQuery() (v url.Values)
URLQuery serializes TripsForLocationListParams's query parameters as `url.Values`.
type TripsForLocationListResponse ¶
type TripsForLocationListResponse struct { Data TripsForLocationListResponseData `json:"data,required"` JSON tripsForLocationListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*TripsForLocationListResponse) UnmarshalJSON ¶
func (r *TripsForLocationListResponse) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseData ¶
type TripsForLocationListResponseData struct { // Indicates if the limit of trips has been exceeded LimitExceeded bool `json:"limitExceeded,required"` List []TripsForLocationListResponseDataList `json:"list,required"` References shared.References `json:"references,required"` // Indicates if the search location is out of range OutOfRange bool `json:"outOfRange"` JSON tripsForLocationListResponseDataJSON `json:"-"` }
func (*TripsForLocationListResponseData) UnmarshalJSON ¶
func (r *TripsForLocationListResponseData) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseDataList ¶
type TripsForLocationListResponseDataList struct { Schedule TripsForLocationListResponseDataListSchedule `json:"schedule,required"` Status TripsForLocationListResponseDataListStatus `json:"status,required"` TripID string `json:"tripId,required"` Frequency string `json:"frequency,nullable"` ServiceDate int64 `json:"serviceDate"` SituationIDs []string `json:"situationIds"` JSON tripsForLocationListResponseDataListJSON `json:"-"` }
func (*TripsForLocationListResponseDataList) UnmarshalJSON ¶
func (r *TripsForLocationListResponseDataList) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseDataListSchedule ¶
type TripsForLocationListResponseDataListSchedule struct { NextTripID string `json:"nextTripId,required"` PreviousTripID string `json:"previousTripId,required"` StopTimes []TripsForLocationListResponseDataListScheduleStopTime `json:"stopTimes,required"` TimeZone string `json:"timeZone,required"` Frequency string `json:"frequency,nullable"` JSON tripsForLocationListResponseDataListScheduleJSON `json:"-"` }
func (*TripsForLocationListResponseDataListSchedule) UnmarshalJSON ¶
func (r *TripsForLocationListResponseDataListSchedule) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseDataListScheduleStopTime ¶
type TripsForLocationListResponseDataListScheduleStopTime struct { ArrivalTime int64 `json:"arrivalTime"` DepartureTime int64 `json:"departureTime"` DistanceAlongTrip float64 `json:"distanceAlongTrip"` HistoricalOccupancy string `json:"historicalOccupancy"` StopHeadsign string `json:"stopHeadsign"` StopID string `json:"stopId"` JSON tripsForLocationListResponseDataListScheduleStopTimeJSON `json:"-"` }
func (*TripsForLocationListResponseDataListScheduleStopTime) UnmarshalJSON ¶
func (r *TripsForLocationListResponseDataListScheduleStopTime) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseDataListStatus ¶
type TripsForLocationListResponseDataListStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation TripsForLocationListResponseDataListStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position TripsForLocationListResponseDataListStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON tripsForLocationListResponseDataListStatusJSON `json:"-"` }
func (*TripsForLocationListResponseDataListStatus) UnmarshalJSON ¶
func (r *TripsForLocationListResponseDataListStatus) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseDataListStatusLastKnownLocation ¶
type TripsForLocationListResponseDataListStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON tripsForLocationListResponseDataListStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*TripsForLocationListResponseDataListStatusLastKnownLocation) UnmarshalJSON ¶
func (r *TripsForLocationListResponseDataListStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type TripsForLocationListResponseDataListStatusPosition ¶
type TripsForLocationListResponseDataListStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON tripsForLocationListResponseDataListStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*TripsForLocationListResponseDataListStatusPosition) UnmarshalJSON ¶
func (r *TripsForLocationListResponseDataListStatusPosition) UnmarshalJSON(data []byte) (err error)
type TripsForLocationService ¶
type TripsForLocationService struct {
Options []option.RequestOption
}
TripsForLocationService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTripsForLocationService method instead.
func NewTripsForLocationService ¶
func NewTripsForLocationService(opts ...option.RequestOption) (r *TripsForLocationService)
NewTripsForLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TripsForLocationService) List ¶
func (r *TripsForLocationService) List(ctx context.Context, query TripsForLocationListParams, opts ...option.RequestOption) (res *TripsForLocationListResponse, err error)
Retrieve trips for a given location
type TripsForRouteListParams ¶
type TripsForRouteListParams struct { // Determine whether full schedule elements are included. Defaults to false. IncludeSchedule param.Field[bool] `query:"includeSchedule"` // Determine whether full tripStatus elements with real-time information are // included. Defaults to false. IncludeStatus param.Field[bool] `query:"includeStatus"` // Query the system at a specific time. Useful for testing. Time param.Field[int64] `query:"time"` }
func (TripsForRouteListParams) URLQuery ¶
func (r TripsForRouteListParams) URLQuery() (v url.Values)
URLQuery serializes TripsForRouteListParams's query parameters as `url.Values`.
type TripsForRouteListResponse ¶
type TripsForRouteListResponse struct { Data TripsForRouteListResponseData `json:"data,required"` JSON tripsForRouteListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*TripsForRouteListResponse) UnmarshalJSON ¶
func (r *TripsForRouteListResponse) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseData ¶
type TripsForRouteListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []TripsForRouteListResponseDataList `json:"list,required"` References shared.References `json:"references,required"` JSON tripsForRouteListResponseDataJSON `json:"-"` }
func (*TripsForRouteListResponseData) UnmarshalJSON ¶
func (r *TripsForRouteListResponseData) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseDataList ¶
type TripsForRouteListResponseDataList struct { Schedule TripsForRouteListResponseDataListSchedule `json:"schedule,required"` Status TripsForRouteListResponseDataListStatus `json:"status,required"` TripID string `json:"tripId,required"` Frequency string `json:"frequency,nullable"` ServiceDate int64 `json:"serviceDate"` SituationIDs []string `json:"situationIds"` JSON tripsForRouteListResponseDataListJSON `json:"-"` }
func (*TripsForRouteListResponseDataList) UnmarshalJSON ¶
func (r *TripsForRouteListResponseDataList) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseDataListSchedule ¶
type TripsForRouteListResponseDataListSchedule struct { NextTripID string `json:"nextTripId,required"` PreviousTripID string `json:"previousTripId,required"` StopTimes []TripsForRouteListResponseDataListScheduleStopTime `json:"stopTimes,required"` TimeZone string `json:"timeZone,required"` Frequency string `json:"frequency,nullable"` JSON tripsForRouteListResponseDataListScheduleJSON `json:"-"` }
func (*TripsForRouteListResponseDataListSchedule) UnmarshalJSON ¶
func (r *TripsForRouteListResponseDataListSchedule) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseDataListScheduleStopTime ¶
type TripsForRouteListResponseDataListScheduleStopTime struct { ArrivalTime int64 `json:"arrivalTime"` DepartureTime int64 `json:"departureTime"` DistanceAlongTrip float64 `json:"distanceAlongTrip"` HistoricalOccupancy string `json:"historicalOccupancy"` StopHeadsign string `json:"stopHeadsign"` StopID string `json:"stopId"` JSON tripsForRouteListResponseDataListScheduleStopTimeJSON `json:"-"` }
func (*TripsForRouteListResponseDataListScheduleStopTime) UnmarshalJSON ¶
func (r *TripsForRouteListResponseDataListScheduleStopTime) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseDataListStatus ¶
type TripsForRouteListResponseDataListStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation TripsForRouteListResponseDataListStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position TripsForRouteListResponseDataListStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON tripsForRouteListResponseDataListStatusJSON `json:"-"` }
func (*TripsForRouteListResponseDataListStatus) UnmarshalJSON ¶
func (r *TripsForRouteListResponseDataListStatus) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseDataListStatusLastKnownLocation ¶
type TripsForRouteListResponseDataListStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON tripsForRouteListResponseDataListStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*TripsForRouteListResponseDataListStatusLastKnownLocation) UnmarshalJSON ¶
func (r *TripsForRouteListResponseDataListStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type TripsForRouteListResponseDataListStatusPosition ¶
type TripsForRouteListResponseDataListStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON tripsForRouteListResponseDataListStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*TripsForRouteListResponseDataListStatusPosition) UnmarshalJSON ¶
func (r *TripsForRouteListResponseDataListStatusPosition) UnmarshalJSON(data []byte) (err error)
type TripsForRouteService ¶
type TripsForRouteService struct {
Options []option.RequestOption
}
TripsForRouteService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTripsForRouteService method instead.
func NewTripsForRouteService ¶
func NewTripsForRouteService(opts ...option.RequestOption) (r *TripsForRouteService)
NewTripsForRouteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TripsForRouteService) List ¶
func (r *TripsForRouteService) List(ctx context.Context, routeID string, query TripsForRouteListParams, opts ...option.RequestOption) (res *TripsForRouteListResponse, err error)
Search for active trips for a specific route.
type VehiclesForAgencyListParams ¶
type VehiclesForAgencyListParams struct { // Specific time for querying the status (timestamp format) Time param.Field[string] `query:"time"` }
func (VehiclesForAgencyListParams) URLQuery ¶
func (r VehiclesForAgencyListParams) URLQuery() (v url.Values)
URLQuery serializes VehiclesForAgencyListParams's query parameters as `url.Values`.
type VehiclesForAgencyListResponse ¶
type VehiclesForAgencyListResponse struct { Data VehiclesForAgencyListResponseData `json:"data,required"` JSON vehiclesForAgencyListResponseJSON `json:"-"` shared.ResponseWrapper }
func (*VehiclesForAgencyListResponse) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponse) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyListResponseData ¶
type VehiclesForAgencyListResponseData struct { LimitExceeded bool `json:"limitExceeded,required"` List []VehiclesForAgencyListResponseDataList `json:"list,required"` References shared.References `json:"references,required"` JSON vehiclesForAgencyListResponseDataJSON `json:"-"` }
func (*VehiclesForAgencyListResponseData) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponseData) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyListResponseDataList ¶
type VehiclesForAgencyListResponseDataList struct { LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` LastUpdateTime int64 `json:"lastUpdateTime,required"` Location VehiclesForAgencyListResponseDataListLocation `json:"location,required"` TripID string `json:"tripId,required"` TripStatus VehiclesForAgencyListResponseDataListTripStatus `json:"tripStatus,required"` VehicleID string `json:"vehicleId,required"` OccupancyCapacity int64 `json:"occupancyCapacity"` OccupancyCount int64 `json:"occupancyCount"` OccupancyStatus string `json:"occupancyStatus"` Phase string `json:"phase"` Status string `json:"status"` JSON vehiclesForAgencyListResponseDataListJSON `json:"-"` }
func (*VehiclesForAgencyListResponseDataList) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponseDataList) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyListResponseDataListLocation ¶
type VehiclesForAgencyListResponseDataListLocation struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` JSON vehiclesForAgencyListResponseDataListLocationJSON `json:"-"` }
func (*VehiclesForAgencyListResponseDataListLocation) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponseDataListLocation) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyListResponseDataListTripStatus ¶
type VehiclesForAgencyListResponseDataListTripStatus struct { // Trip ID of the trip the vehicle is actively serving. ActiveTripID string `json:"activeTripId,required"` // Index of the active trip into the sequence of trips for the active block. BlockTripSequence int64 `json:"blockTripSequence,required"` // ID of the closest stop to the current location of the transit vehicle. ClosestStop string `json:"closestStop,required"` // Distance, in meters, the transit vehicle has progressed along the active trip. DistanceAlongTrip float64 `json:"distanceAlongTrip,required"` // Last known distance along the trip received in real-time from the transit // vehicle. LastKnownDistanceAlongTrip float64 `json:"lastKnownDistanceAlongTrip,required"` // Timestamp of the last known real-time location update from the transit vehicle. LastLocationUpdateTime int64 `json:"lastLocationUpdateTime,required"` // Timestamp of the last known real-time update from the transit vehicle. LastUpdateTime int64 `json:"lastUpdateTime,required"` // Capacity of the transit vehicle in terms of occupancy. OccupancyCapacity int64 `json:"occupancyCapacity,required"` // Current count of occupants in the transit vehicle. OccupancyCount int64 `json:"occupancyCount,required"` // Current occupancy status of the transit vehicle. OccupancyStatus string `json:"occupancyStatus,required"` // Current journey phase of the trip. Phase string `json:"phase,required"` // Indicates if real-time arrival info is available for this trip. Predicted bool `json:"predicted,required"` // Deviation from the schedule in seconds (positive for late, negative for early). ScheduleDeviation int64 `json:"scheduleDeviation,required"` // Time, in milliseconds since the Unix epoch, of midnight for the start of the // service date for the trip. ServiceDate int64 `json:"serviceDate,required"` // Current status modifiers for the trip. Status string `json:"status,required"` // Total length of the trip, in meters. TotalDistanceAlongTrip float64 `json:"totalDistanceAlongTrip,required"` // Time offset from the closest stop to the current position of the transit vehicle // (in seconds). ClosestStopTimeOffset int64 `json:"closestStopTimeOffset"` // Information about frequency-based scheduling, if applicable to the trip. Frequency string `json:"frequency"` // Last known location of the transit vehicle. LastKnownLocation VehiclesForAgencyListResponseDataListTripStatusLastKnownLocation `json:"lastKnownLocation"` // Last known orientation value received in real-time from the transit vehicle. LastKnownOrientation float64 `json:"lastKnownOrientation"` // ID of the next stop the transit vehicle is scheduled to arrive at. NextStop string `json:"nextStop"` // Time offset from the next stop to the current position of the transit vehicle // (in seconds). NextStopTimeOffset int64 `json:"nextStopTimeOffset"` // Orientation of the transit vehicle, represented as an angle in degrees. Orientation float64 `json:"orientation"` // Current position of the transit vehicle. Position VehiclesForAgencyListResponseDataListTripStatusPosition `json:"position"` // Distance, in meters, the transit vehicle is scheduled to have progressed along // the active trip. ScheduledDistanceAlongTrip float64 `json:"scheduledDistanceAlongTrip"` // References to situation elements (if any) applicable to this trip. SituationIDs []string `json:"situationIds"` // ID of the transit vehicle currently serving the trip. VehicleID string `json:"vehicleId"` JSON vehiclesForAgencyListResponseDataListTripStatusJSON `json:"-"` }
func (*VehiclesForAgencyListResponseDataListTripStatus) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponseDataListTripStatus) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyListResponseDataListTripStatusLastKnownLocation ¶
type VehiclesForAgencyListResponseDataListTripStatusLastKnownLocation struct { // Latitude of the last known location of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the last known location of the transit vehicle. Lon float64 `json:"lon"` JSON vehiclesForAgencyListResponseDataListTripStatusLastKnownLocationJSON `json:"-"` }
Last known location of the transit vehicle.
func (*VehiclesForAgencyListResponseDataListTripStatusLastKnownLocation) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponseDataListTripStatusLastKnownLocation) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyListResponseDataListTripStatusPosition ¶
type VehiclesForAgencyListResponseDataListTripStatusPosition struct { // Latitude of the current position of the transit vehicle. Lat float64 `json:"lat"` // Longitude of the current position of the transit vehicle. Lon float64 `json:"lon"` JSON vehiclesForAgencyListResponseDataListTripStatusPositionJSON `json:"-"` }
Current position of the transit vehicle.
func (*VehiclesForAgencyListResponseDataListTripStatusPosition) UnmarshalJSON ¶
func (r *VehiclesForAgencyListResponseDataListTripStatusPosition) UnmarshalJSON(data []byte) (err error)
type VehiclesForAgencyService ¶
type VehiclesForAgencyService struct {
Options []option.RequestOption
}
VehiclesForAgencyService contains methods and other services that help with interacting with the onebusaway-sdk API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVehiclesForAgencyService method instead.
func NewVehiclesForAgencyService ¶
func NewVehiclesForAgencyService(opts ...option.RequestOption) (r *VehiclesForAgencyService)
NewVehiclesForAgencyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VehiclesForAgencyService) List ¶
func (r *VehiclesForAgencyService) List(ctx context.Context, agencyID string, query VehiclesForAgencyListParams, opts ...option.RequestOption) (res *VehiclesForAgencyListResponse, err error)
Get vehicles for a specific agency
Source Files
¶
- agencieswithcoverage.go
- agency.go
- aliases.go
- arrivalanddeparture.go
- block.go
- client.go
- config.go
- currenttime.go
- field.go
- reportproblemwithstop.go
- reportproblemwithtrip.go
- route.go
- routeidsforagency.go
- routesforagency.go
- routesforlocation.go
- scheduleforroute.go
- scheduleforstop.go
- searchforroute.go
- searchforstop.go
- shape.go
- stop.go
- stopidsforagency.go
- stopsforagency.go
- stopsforlocation.go
- stopsforroute.go
- trip.go
- tripdetail.go
- tripforvehicle.go
- tripsforlocation.go
- tripsforroute.go
- vehiclesforagency.go