Module: Aucklandia::Trips

Included in:
Client
Defined in:
lib/aucklandia/trips.rb

Constant Summary collapse

TRIPS_ENDPOINT =
'/gtfs/trips'

Instance Method Summary collapse

Instance Method Details

#get_tripsObject



5
6
7
8
9
10
11
# File 'lib/aucklandia/trips.rb', line 5

def get_trips
	url = build_url(BASE_URL, TRIPS_ENDPOINT)

	response = get(url)

	JSON.parse(response)['response']
end

#get_trips_by_route(route_id) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/aucklandia/trips.rb', line 13

def get_trips_by_route(route_id)
  url = build_url(BASE_URL, TRIPS_ENDPOINT, '/routeid/', route_id)

  response = get(url)

  JSON.parse(response)['response']
end