Class: NDFD::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ndfd/client.rb,
lib/ndfd/client/error.rb,
lib/ndfd/client/query.rb,
lib/ndfd/client/version.rb,
lib/ndfd/client/help_console.rb,
lib/ndfd/client/query/select_query.rb,
lib/ndfd/client/query/query_property.rb,
lib/ndfd/client/query/query_utilities.rb,
lib/ndfd/client/query/select_by_days_query.rb,
lib/ndfd/client/query/selection_attributes.rb,
lib/ndfd/client/query/select_coordinates_by_zip_query.rb,
lib/ndfd/client/query/select_corner_coordinates_query.rb,
lib/ndfd/client/query/select_square_coordinates_query.rb,
lib/ndfd/client/query/select_coordinates_by_cities_query.rb,
lib/ndfd/client/query/select_gridpoint_coordinates_query.rb,
lib/ndfd/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, SelectLinepointCoordinatesQuery, SelectQuery, SelectSquareCoordinatesQuery, SelectionAttributes

Constant Summary collapse

DEFAULT_WSDL =
"http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl"
VERSION =
"1.1.0"

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/ndfd/client.rb', line 13

def initialize(options = {})
  @options = options

  if options[:wsdl].blank?
    @options.merge!(:wsdl => NDFD::Client::DEFAULT_WSDL)
  end

  if options[:logger].present?
    HttpLogger.logger = options[:logger]
  end
end

Instance Method Details

#select(*options) ⇒ Object

Query Methods


33
34
35
# File 'lib/ndfd/client.rb', line 33

def select(*options)
  NDFD::Client::SelectQuery.new(soap_client, options)
end

#select_by_daysObject


37
38
39
# File 'lib/ndfd/client.rb', line 37

def select_by_days
  NDFD::Client::SelectByDaysQuery.new(soap_client)
end

#select_coordinates_by_citiesObject


45
46
47
# File 'lib/ndfd/client.rb', line 45

def select_coordinates_by_cities
  NDFD::Client::SelectCoordinatesByCitiesQuery.new(soap_client)
end

#select_coordinates_by_zipObject


41
42
43
# File 'lib/ndfd/client.rb', line 41

def select_coordinates_by_zip
  NDFD::Client::SelectCoordinatesByZipQuery.new(soap_client)
end

#select_corner_coordinatesObject


61
62
63
# File 'lib/ndfd/client.rb', line 61

def select_corner_coordinates
  NDFD::Client::SelectCornerCoordinatesQuery.new(soap_client)
end

#select_gridpoint_coordinatesObject


53
54
55
# File 'lib/ndfd/client.rb', line 53

def select_gridpoint_coordinates
  NDFD::Client::SelectGridpointCoordinatesQuery.new(soap_client)
end

#select_linepoint_coordinatesObject


57
58
59
# File 'lib/ndfd/client.rb', line 57

def select_linepoint_coordinates
  NDFD::Client::SelectLinepointCoordinatesQuery.new(soap_client)
end

#select_square_coordinatesObject


49
50
51
# File 'lib/ndfd/client.rb', line 49

def select_square_coordinates
  NDFD::Client::SelectSquareCoordinatesQuery.new(soap_client)
end

#soap_clientObject


25
26
27
# File 'lib/ndfd/client.rb', line 25

def soap_client
  @soap_client ||= Savon.client(@options)
end