Class: LibTAD::Client
- Inherits:
-
Object
- Object
- LibTAD::Client
- Includes:
- AstronomyService, DateCalculatorService, HolidaysService, OnThisDayService, PlacesService, TidesService, TimeService
- Defined in:
- lib/libtad.rb,
lib/services/time.rb,
lib/services/tides.rb,
lib/services/places.rb,
lib/services/holidays.rb,
lib/services/astronomy.rb,
lib/services/onthisday.rb,
lib/services/date_calculator.rb
Overview
Main endpoint for accessing the Time and Date APIs.
Defined Under Namespace
Modules: AstronomyService, DateCalculatorService, HolidaysService, OnThisDayService, PlacesService, TidesService, TimeService
Constant Summary collapse
- ENDPOINT =
The endpoint the client connects to.
'https://api.xmltime.com/'.freeze
- USER_AGENT =
Client user agent.
'libtad-ruby-0.1.0'.freeze
- VERSION =
API version.
3.freeze
Instance Method Summary collapse
-
#initialize(access_key:, secret_key:) ⇒ Client
constructor
A new instance of Client.
Methods included from TimeService
#convert_time, #get_current_time, #get_daylight_savings_time
Methods included from TidesService
Methods included from PlacesService
Methods included from OnThisDayService
Methods included from HolidaysService
Methods included from DateCalculatorService
#add_days, #get_duration, #subtract_days
Methods included from AstronomyService
#get_astro_events, #get_astro_position
Constructor Details
#initialize(access_key:, secret_key:) ⇒ Client
Returns a new instance of Client.
77 78 79 80 |
# File 'lib/libtad.rb', line 77 def initialize(access_key:, secret_key:) @access_key = access_key @secret_key = secret_key end |