module Aucklandia::Trips

Constants

TRIPS_ENDPOINT

Public Instance Methods

get_trips() click to toggle source
# 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) click to toggle source
# 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