Module: Aucklandia::Stops

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

Constant Summary collapse

STOPS_ENDPOINT =
'/gtfs/stops'

Instance Method Summary collapse

Instance Method Details

#get_stopsObject



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

def get_stops
  url = build_url(BASE_URL, STOPS_ENDPOINT)

  response = get(url)

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

#get_stops_by_trip_id(trip_id) ⇒ Object



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

def get_stops_by_trip_id(trip_id)
  url = build_url(BASE_URL, STOPS_ENDPOINT, '/tripId/', trip_id)

  response = get(url)

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