Class: LibTAD::Client

Inherits:
Object
  • Object
show all
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

Methods included from TimeService

#convert_time, #get_current_time, #get_daylight_savings_time

Methods included from TidesService

#get_tidal_data

Methods included from PlacesService

#get_places

Methods included from OnThisDayService

#get_events_on_this_day

Methods included from HolidaysService

#get_holidays

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