module Aucklandia::Routes

Constants

ROUTE_ENDPOINT

Public Instance Methods

get_route_by_id(route_id) click to toggle source
# File lib/aucklandia/routes.rb, line 21
def get_route_by_id(route_id)
  url = build_url(BASE_URL, ROUTE_ENDPOINT, '/routeId/', route_id)

  response = get(url)

  JSON.parse(response)['response'].first
end
get_routes() click to toggle source
# File lib/aucklandia/routes.rb, line 5
def get_routes
  url = build_url(BASE_URL, ROUTE_ENDPOINT)

  response = get(url)

  JSON.parse(response)['response']
end
get_routes_by_short_name(short_name) click to toggle source
# File lib/aucklandia/routes.rb, line 13
def get_routes_by_short_name(short_name)
  url = build_url(BASE_URL, ROUTE_ENDPOINT, '/routeShortName/', short_name)

  response = get(url)

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