Class: Google::Apis::PollenV1::PollenService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::PollenV1::PollenService
- Defined in:
- lib/google/apis/pollen_v1/service.rb
Overview
Pollen API
The Pollen API.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://pollen.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#initialize ⇒ PollenService
constructor
A new instance of PollenService.
-
#lookup_forecast(days: nil, language_code: nil, location_latitude: nil, location_longitude: nil, page_size: nil, page_token: nil, plants_description: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PollenV1::LookupForecastResponse
Returns up to 5 days of daily pollen information in more than 65 countries, up to 1km resolution.
-
#lookup_map_type_heatmap_tile_heatmap_tile(map_type, zoom, x, y, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PollenV1::HttpBody
Returns a byte array containing the data of the tile PNG image.
Constructor Details
#initialize ⇒ PollenService
Returns a new instance of PollenService.
47 48 49 50 51 52 |
# File 'lib/google/apis/pollen_v1/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-pollen_v1', client_version: Google::Apis::PollenV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/pollen_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/pollen_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#lookup_forecast(days: nil, language_code: nil, location_latitude: nil, location_longitude: nil, page_size: nil, page_token: nil, plants_description: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PollenV1::LookupForecastResponse
Returns up to 5 days of daily pollen information in more than 65 countries, up to 1km resolution.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/google/apis/pollen_v1/service.rb', line 96 def lookup_forecast(days: nil, language_code: nil, location_latitude: nil, location_longitude: nil, page_size: nil, page_token: nil, plants_description: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/forecast:lookup', ) command.response_representation = Google::Apis::PollenV1::LookupForecastResponse::Representation command.response_class = Google::Apis::PollenV1::LookupForecastResponse command.query['days'] = days unless days.nil? command.query['languageCode'] = language_code unless language_code.nil? command.query['location.latitude'] = location_latitude unless location_latitude.nil? command.query['location.longitude'] = location_longitude unless location_longitude.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['plantsDescription'] = plants_description unless plants_description.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#lookup_map_type_heatmap_tile_heatmap_tile(map_type, zoom, x, y, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PollenV1::HttpBody
Returns a byte array containing the data of the tile PNG image.
143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/google/apis/pollen_v1/service.rb', line 143 def lookup_map_type_heatmap_tile_heatmap_tile(map_type, zoom, x, y, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}', ) command.response_representation = Google::Apis::PollenV1::HttpBody::Representation command.response_class = Google::Apis::PollenV1::HttpBody command.params['mapType'] = map_type unless map_type.nil? command.params['zoom'] = zoom unless zoom.nil? command.params['x'] = x unless x.nil? command.params['y'] = y unless y.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |