Class: WeatherForecasts::Client
- Inherits:
-
Object
- Object
- WeatherForecasts::Client
show all
- Defined in:
- lib/weather_forecasts/client.rb,
lib/weather_forecasts/client/error.rb,
lib/weather_forecasts/client/query.rb,
lib/weather_forecasts/client/version.rb,
lib/weather_forecasts/client/help_console.rb,
lib/weather_forecasts/client/query/select_query.rb,
lib/weather_forecasts/client/query/query_property.rb,
lib/weather_forecasts/client/query/query_utilities.rb,
lib/weather_forecasts/client/query/select_hourly_query.rb,
lib/weather_forecasts/client/query/select_by_days_query.rb,
lib/weather_forecasts/client/query/selection_attributes.rb,
lib/weather_forecasts/client/query/select_coordinates_by_zip_query.rb,
lib/weather_forecasts/client/query/select_corner_coordinates_query.rb,
lib/weather_forecasts/client/query/select_square_coordinates_query.rb,
lib/weather_forecasts/client/query/select_coordinates_by_cities_query.rb,
lib/weather_forecasts/client/query/select_gridpoint_coordinates_query.rb,
lib/weather_forecasts/client/query/select_linepoint_coordinates_query.rb
Defined Under Namespace
Modules: QueryUtilities
Classes: HelpConsole, InvalidOptionSpecifiedError, InvalidPropertyTypeError, InvalidSelectionAttributeError, Query, QueryProperty, RequiredKeysMissingError, RequiredPropertyError, SelectByDaysQuery, SelectCoordinatesByCitiesQuery, SelectCoordinatesByZipQuery, SelectCornerCoordinatesQuery, SelectGridpointCoordinatesQuery, SelectHourlyQuery, SelectLinepointCoordinatesQuery, SelectQuery, SelectSquareCoordinatesQuery, SelectionAttributes
Constant Summary
collapse
- DEFAULT_WSDL =
"http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl"
- VERSION =
"1.2.7"
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/weather_forecasts/client.rb', line 13
def initialize(options = {})
@options = options
if options[:wsdl].blank?
@options.merge!(:wsdl => DEFAULT_WSDL)
end
if options[:logger].present?
HttpLogger.logger = options[:logger]
end
end
|
Instance Method Details
#select(*options) ⇒ Object
33
34
35
|
# File 'lib/weather_forecasts/client.rb', line 33
def select(*options)
SelectQuery.new(soap_client, options)
end
|
#select_by_days ⇒ Object
41
42
43
|
# File 'lib/weather_forecasts/client.rb', line 41
def select_by_days
SelectByDaysQuery.new(soap_client)
end
|
#select_coordinates_by_cities ⇒ Object
#select_coordinates_by_zip ⇒ Object
#select_corner_coordinates ⇒ Object
#select_gridpoint_coordinates ⇒ Object
#select_hourly ⇒ Object
37
38
39
|
# File 'lib/weather_forecasts/client.rb', line 37
def select_hourly
SelectHourlyQuery.new(nil)
end
|
#select_linepoint_coordinates ⇒ Object
#select_square_coordinates ⇒ Object
#soap_client ⇒ Object
25
26
27
|
# File 'lib/weather_forecasts/client.rb', line 25
def soap_client
@soap_client ||= Savon.client(@options)
end
|