Class: WeatherApiTask::WeatherApiTaskClient

Inherits:
Object
  • Object
show all
Defined in:
lib/weather_api_task/weather_api_task_client.rb

Overview

weather_api_task client class.

Instance Method Summary collapse

Constructor Details

#initialize(appid: 'e7b16ebe3fbe47e6b97f6821cff80e5d') ⇒ WeatherApiTaskClient

Initializer with authentication and configuration parameters.



22
23
24
25
# File 'lib/weather_api_task/weather_api_task_client.rb', line 22

def initialize(appid: 'e7b16ebe3fbe47e6b97f6821cff80e5d')
  Configuration.appid = appid if
    appid
end

Instance Method Details

#configConfiguration

Returns the configuration class for easy access.

Returns:

  • Returns the actual configuration class.



17
18
19
# File 'lib/weather_api_task/weather_api_task_client.rb', line 17

def config
  Configuration
end

#find_weatherFindWeatherController

Singleton access to find_weather controller.

Returns:

  • Returns the controller instance.



11
12
13
# File 'lib/weather_api_task/weather_api_task_client.rb', line 11

def find_weather
  FindWeatherController.instance
end