-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.go
33 lines (32 loc) · 1.57 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Package oba - One Bus Away Go Api https://onebusaway.org/
// Author: Seth T <[email protected]>
package oba
// Client - Interface for a One Bus Away Client
type Client interface {
AgenciesWithCoverage() ([]AgencyWithCoverage, error)
Agency(id string) (*Agency, error)
ArrivalAndDepartureForStop(id string, params map[string]string) (*ArrivalAndDeparture, error)
ArrivalsAndDeparturesForStop(id string, params map[string]string) (*StopWithArrivalsAndDepartures, error)
Block(id string) (*Block, error)
CancelAlarm(id string) error
CurrentTime() (*CurrentTime, error)
RegisterAlarmForArrivalAndDepartureAtStop(id string, params map[string]string) (*RegisteredAlarm, error)
ReportProblemWithStop(id string, params map[string]string) error
ReportProblemWithTrip(id string, params map[string]string) error
RouteIdsForAgency(id string) ([]string, error)
Route(id string) (*Route, error)
RoutesForAgency(id string) ([]Route, error)
RoutesForLocation(params map[string]string) ([]Route, error)
ScheduleForStop(id string) (*StopSchedule, error)
Shape(id string) (*Shape, error)
StopIDsForAgency(id string) ([]string, error)
Stop(id string) (*Stop, error)
StopsForLocation(params map[string]string) ([]Stop, error)
StopsForRoute(id string) (*StopsForRoute, error)
TripDetails(id string) (*TripDetails, error)
TripForVehicle(id string, params map[string]string) (*TripDetails, error)
Trip(id string) (*Trip, error)
TripsForLocation(params map[string]string) ([]TripDetails, error)
TripsForRoute(id string) ([]TripDetails, error)
VehiclesForAgency(id string) ([]VehicleStatus, error)
}