Class: Alman::DefaultClient
- Defined in:
- lib/alman/clients/default_client.rb
Instance Attribute Summary
Attributes inherited from ApiClient
Instance Method Summary collapse
- #bookings ⇒ Object
- #calendars ⇒ Object
-
#initialize(api_key) ⇒ DefaultClient
constructor
A new instance of DefaultClient.
- #refresh_from(api_key) ⇒ Object
- #vacancies ⇒ Object
Methods inherited from ApiClient
Constructor Details
#initialize(api_key) ⇒ DefaultClient
Returns a new instance of DefaultClient.
4 5 6 |
# File 'lib/alman/clients/default_client.rb', line 4 def initialize(api_key) self.refresh_from(api_key) end |
Instance Method Details
#bookings ⇒ Object
26 27 28 |
# File 'lib/alman/clients/default_client.rb', line 26 def bookings @bookings ||= BookingsEndpoint.new(self) end |
#calendars ⇒ Object
18 19 20 |
# File 'lib/alman/clients/default_client.rb', line 18 def calendars @calendars ||= CalendarsEndpoint.new(self) end |
#refresh_from(api_key) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/alman/clients/default_client.rb', line 8 def refresh_from(api_key) headers = { :Accept => "application/json", :"Content-Type" => "application/json", :Authorization => api_key, } params = {} super(headers, params) end |
#vacancies ⇒ Object
22 23 24 |
# File 'lib/alman/clients/default_client.rb', line 22 def vacancies @vacancies ||= VacanciesEndpoint.new(self) end |