Class: WeatherForecasts::Client::SelectCoordinatesByCitiesQuery

Inherits:
Query
  • Object
show all
Defined in:
lib/weather_forecasts/client/query/select_coordinates_by_cities_query.rb

Constant Summary collapse

CITY_OPTIONS =
{
  :all                    => 1234,
  :primary                => 1,
  :secondary              => 2,
  :tertiary               => 3,
  :quaternary             => 4,
  :primary_and_secondary  => 12,
  :tertiary_and_quaternar => 34
}

Constants inherited from Query

Query::FORECAST_ELEMENTS

Instance Attribute Summary

Attributes inherited from Query

#conditions, #select_attributes, #soap_client

Instance Method Summary collapse

Methods inherited from Query

#initialize, properties, property, selection_attributes, set_selection_attributes, #validate, #where

Constructor Details

This class inherits a constructor from WeatherForecasts::Client::Query

Instance Method Details

#executeObject



16
17
18
19
20
21
22
# File 'lib/weather_forecasts/client/query/select_coordinates_by_cities_query.rb', line 16

def execute
  validate

  response = soap_client.call(:lat_lon_list_city_names, :message => build_message)
  document = parse_xml(response)
  transform_document_to_mapped_list(document)
end