Class: Aucklandia::Client

Inherits:
Object
  • Object
show all
Includes:
CalendarDates, Calendars, Notifications, ParkingLocations, Routes, ScheduledWorks, Shapes, StopTimes, Stops, Trips, VehiclePositions, Versions, Requestable
Defined in:
lib/aucklandia/client.rb

Constant Summary

Constants included from CalendarDates

Aucklandia::CalendarDates::CALENDAR_DATES_ENDPOINT

Constants included from Calendars

Aucklandia::Calendars::CALENDARS_ENDPOINT

Constants included from ParkingLocations

ParkingLocations::PARKING_LOCATIONS_ENDPOINT

Constants included from Notifications

Notifications::NOTIFICATIONS_ENDPOINT

Constants included from StopTimes

StopTimes::STOP_TIMES_ENDPOINT

Constants included from ScheduledWorks

ScheduledWorks::SCHEDULED_WORKS_ENDPOINT

Constants included from Shapes

Shapes::SHAPES_ENDPOINT

Constants included from Stops

Stops::STOPS_ENDPOINT

Constants included from Versions

Versions::VERSIONS_ENDPOINT

Constants included from VehiclePositions

VehiclePositions::VEHICLE_POSITIONS_ENDPOINT

Constants included from Trips

Trips::TRIPS_ENDPOINT

Constants included from Routes

Routes::ROUTE_ENDPOINT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Requestable

#build_url, #get

Methods included from CalendarDates

#get_calendar_dates

Methods included from Calendars

#get_calendars

Methods included from ParkingLocations

#get_parking_locations

Methods included from Notifications

#get_notifications, #get_notifications_by_category, #get_notifications_by_stop_id

Methods included from StopTimes

#get_stop_times_by_trip_id

Methods included from ScheduledWorks

#get_scheduled_works

Methods included from Shapes

#get_shapes_by_trip

Methods included from Stops

#get_stops, #get_stops_by_trip_id

Methods included from Versions

#get_versions

Methods included from VehiclePositions

#get_vehicle_position_by_vehicle_id, #get_vehicle_positions, #get_vehicle_positions_by_route_id

Methods included from Trips

#get_trips, #get_trips_by_route

Methods included from Routes

#get_route_by_id, #get_routes, #get_routes_by_short_name

Constructor Details

#initialize(authorization_key) ⇒ Client

Returns a new instance of Client.



19
20
21
# File 'lib/aucklandia/client.rb', line 19

def initialize(authorization_key)
  @authorization_key = authorization_key
end

Instance Attribute Details

#authorization_keyObject (readonly)

Returns the value of attribute authorization_key.



18
19
20
# File 'lib/aucklandia/client.rb', line 18

def authorization_key
  @authorization_key
end

Instance Method Details

#headersObject



23
24
25
26
27
# File 'lib/aucklandia/client.rb', line 23

def headers
  {
    "Ocp-Apim-Subscription-Key" => @authorization_key
  }
end