google-apis-airquality_v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/airquality_v1/classes.rb +1004 -0
- data/lib/google/apis/airquality_v1/gem_version.rb +28 -0
- data/lib/google/apis/airquality_v1/representations.rb +346 -0
- data/lib/google/apis/airquality_v1/service.rb +201 -0
- data/lib/google/apis/airquality_v1.rb +36 -0
- data/lib/google-apis-airquality_v1.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module AirqualityV1
|
18
|
+
# Version of the google-apis-airquality_v1 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.15.0"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20240609"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,346 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module AirqualityV1
|
24
|
+
|
25
|
+
class AdditionalInfo
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class AirQualityIndex
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Color
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Concentration
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class CustomLocalAqi
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class HealthRecommendations
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class HourInfo
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class HourlyForecast
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class HttpBody
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class Interval
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class LatLng
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class LookupCurrentConditionsRequest
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class LookupCurrentConditionsResponse
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class LookupForecastRequest
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class LookupForecastResponse
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class LookupHistoryRequest
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class LookupHistoryResponse
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class Pollutant
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
133
|
+
class AdditionalInfo
|
134
|
+
# @private
|
135
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
136
|
+
property :effects, as: 'effects'
|
137
|
+
property :sources, as: 'sources'
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
class AirQualityIndex
|
142
|
+
# @private
|
143
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
144
|
+
property :aqi, as: 'aqi'
|
145
|
+
property :aqi_display, as: 'aqiDisplay'
|
146
|
+
property :category, as: 'category'
|
147
|
+
property :code, as: 'code'
|
148
|
+
property :color, as: 'color', class: Google::Apis::AirqualityV1::Color, decorator: Google::Apis::AirqualityV1::Color::Representation
|
149
|
+
|
150
|
+
property :display_name, as: 'displayName'
|
151
|
+
property :dominant_pollutant, as: 'dominantPollutant'
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
class Color
|
156
|
+
# @private
|
157
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
158
|
+
property :alpha, as: 'alpha'
|
159
|
+
property :blue, as: 'blue'
|
160
|
+
property :green, as: 'green'
|
161
|
+
property :red, as: 'red'
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
class Concentration
|
166
|
+
# @private
|
167
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
168
|
+
property :units, as: 'units'
|
169
|
+
property :value, as: 'value'
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
class CustomLocalAqi
|
174
|
+
# @private
|
175
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
176
|
+
property :aqi, as: 'aqi'
|
177
|
+
property :region_code, as: 'regionCode'
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
class HealthRecommendations
|
182
|
+
# @private
|
183
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
184
|
+
property :athletes, as: 'athletes'
|
185
|
+
property :children, as: 'children'
|
186
|
+
property :elderly, as: 'elderly'
|
187
|
+
property :general_population, as: 'generalPopulation'
|
188
|
+
property :heart_disease_population, as: 'heartDiseasePopulation'
|
189
|
+
property :lung_disease_population, as: 'lungDiseasePopulation'
|
190
|
+
property :pregnant_women, as: 'pregnantWomen'
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
class HourInfo
|
195
|
+
# @private
|
196
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
197
|
+
property :date_time, as: 'dateTime'
|
198
|
+
property :health_recommendations, as: 'healthRecommendations', class: Google::Apis::AirqualityV1::HealthRecommendations, decorator: Google::Apis::AirqualityV1::HealthRecommendations::Representation
|
199
|
+
|
200
|
+
collection :indexes, as: 'indexes', class: Google::Apis::AirqualityV1::AirQualityIndex, decorator: Google::Apis::AirqualityV1::AirQualityIndex::Representation
|
201
|
+
|
202
|
+
collection :pollutants, as: 'pollutants', class: Google::Apis::AirqualityV1::Pollutant, decorator: Google::Apis::AirqualityV1::Pollutant::Representation
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
class HourlyForecast
|
208
|
+
# @private
|
209
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
210
|
+
property :date_time, as: 'dateTime'
|
211
|
+
property :health_recommendations, as: 'healthRecommendations', class: Google::Apis::AirqualityV1::HealthRecommendations, decorator: Google::Apis::AirqualityV1::HealthRecommendations::Representation
|
212
|
+
|
213
|
+
collection :indexes, as: 'indexes', class: Google::Apis::AirqualityV1::AirQualityIndex, decorator: Google::Apis::AirqualityV1::AirQualityIndex::Representation
|
214
|
+
|
215
|
+
collection :pollutants, as: 'pollutants', class: Google::Apis::AirqualityV1::Pollutant, decorator: Google::Apis::AirqualityV1::Pollutant::Representation
|
216
|
+
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
class HttpBody
|
221
|
+
# @private
|
222
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
223
|
+
property :content_type, as: 'contentType'
|
224
|
+
property :data, :base64 => true, as: 'data'
|
225
|
+
collection :extensions, as: 'extensions'
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
class Interval
|
230
|
+
# @private
|
231
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
232
|
+
property :end_time, as: 'endTime'
|
233
|
+
property :start_time, as: 'startTime'
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
class LatLng
|
238
|
+
# @private
|
239
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
240
|
+
property :latitude, as: 'latitude'
|
241
|
+
property :longitude, as: 'longitude'
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
class LookupCurrentConditionsRequest
|
246
|
+
# @private
|
247
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
248
|
+
collection :custom_local_aqis, as: 'customLocalAqis', class: Google::Apis::AirqualityV1::CustomLocalAqi, decorator: Google::Apis::AirqualityV1::CustomLocalAqi::Representation
|
249
|
+
|
250
|
+
collection :extra_computations, as: 'extraComputations'
|
251
|
+
property :language_code, as: 'languageCode'
|
252
|
+
property :location, as: 'location', class: Google::Apis::AirqualityV1::LatLng, decorator: Google::Apis::AirqualityV1::LatLng::Representation
|
253
|
+
|
254
|
+
property :uaqi_color_palette, as: 'uaqiColorPalette'
|
255
|
+
property :universal_aqi, as: 'universalAqi'
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
class LookupCurrentConditionsResponse
|
260
|
+
# @private
|
261
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
262
|
+
property :date_time, as: 'dateTime'
|
263
|
+
property :health_recommendations, as: 'healthRecommendations', class: Google::Apis::AirqualityV1::HealthRecommendations, decorator: Google::Apis::AirqualityV1::HealthRecommendations::Representation
|
264
|
+
|
265
|
+
collection :indexes, as: 'indexes', class: Google::Apis::AirqualityV1::AirQualityIndex, decorator: Google::Apis::AirqualityV1::AirQualityIndex::Representation
|
266
|
+
|
267
|
+
collection :pollutants, as: 'pollutants', class: Google::Apis::AirqualityV1::Pollutant, decorator: Google::Apis::AirqualityV1::Pollutant::Representation
|
268
|
+
|
269
|
+
property :region_code, as: 'regionCode'
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
class LookupForecastRequest
|
274
|
+
# @private
|
275
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
276
|
+
collection :custom_local_aqis, as: 'customLocalAqis', class: Google::Apis::AirqualityV1::CustomLocalAqi, decorator: Google::Apis::AirqualityV1::CustomLocalAqi::Representation
|
277
|
+
|
278
|
+
property :date_time, as: 'dateTime'
|
279
|
+
collection :extra_computations, as: 'extraComputations'
|
280
|
+
property :language_code, as: 'languageCode'
|
281
|
+
property :location, as: 'location', class: Google::Apis::AirqualityV1::LatLng, decorator: Google::Apis::AirqualityV1::LatLng::Representation
|
282
|
+
|
283
|
+
property :page_size, as: 'pageSize'
|
284
|
+
property :page_token, as: 'pageToken'
|
285
|
+
property :period, as: 'period', class: Google::Apis::AirqualityV1::Interval, decorator: Google::Apis::AirqualityV1::Interval::Representation
|
286
|
+
|
287
|
+
property :uaqi_color_palette, as: 'uaqiColorPalette'
|
288
|
+
property :universal_aqi, as: 'universalAqi'
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
class LookupForecastResponse
|
293
|
+
# @private
|
294
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
295
|
+
collection :hourly_forecasts, as: 'hourlyForecasts', class: Google::Apis::AirqualityV1::HourlyForecast, decorator: Google::Apis::AirqualityV1::HourlyForecast::Representation
|
296
|
+
|
297
|
+
property :next_page_token, as: 'nextPageToken'
|
298
|
+
property :region_code, as: 'regionCode'
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
class LookupHistoryRequest
|
303
|
+
# @private
|
304
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
305
|
+
collection :custom_local_aqis, as: 'customLocalAqis', class: Google::Apis::AirqualityV1::CustomLocalAqi, decorator: Google::Apis::AirqualityV1::CustomLocalAqi::Representation
|
306
|
+
|
307
|
+
property :date_time, as: 'dateTime'
|
308
|
+
collection :extra_computations, as: 'extraComputations'
|
309
|
+
property :hours, as: 'hours'
|
310
|
+
property :language_code, as: 'languageCode'
|
311
|
+
property :location, as: 'location', class: Google::Apis::AirqualityV1::LatLng, decorator: Google::Apis::AirqualityV1::LatLng::Representation
|
312
|
+
|
313
|
+
property :page_size, as: 'pageSize'
|
314
|
+
property :page_token, as: 'pageToken'
|
315
|
+
property :period, as: 'period', class: Google::Apis::AirqualityV1::Interval, decorator: Google::Apis::AirqualityV1::Interval::Representation
|
316
|
+
|
317
|
+
property :uaqi_color_palette, as: 'uaqiColorPalette'
|
318
|
+
property :universal_aqi, as: 'universalAqi'
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
class LookupHistoryResponse
|
323
|
+
# @private
|
324
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
325
|
+
collection :hours_info, as: 'hoursInfo', class: Google::Apis::AirqualityV1::HourInfo, decorator: Google::Apis::AirqualityV1::HourInfo::Representation
|
326
|
+
|
327
|
+
property :next_page_token, as: 'nextPageToken'
|
328
|
+
property :region_code, as: 'regionCode'
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
class Pollutant
|
333
|
+
# @private
|
334
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
335
|
+
property :additional_info, as: 'additionalInfo', class: Google::Apis::AirqualityV1::AdditionalInfo, decorator: Google::Apis::AirqualityV1::AdditionalInfo::Representation
|
336
|
+
|
337
|
+
property :code, as: 'code'
|
338
|
+
property :concentration, as: 'concentration', class: Google::Apis::AirqualityV1::Concentration, decorator: Google::Apis::AirqualityV1::Concentration::Representation
|
339
|
+
|
340
|
+
property :display_name, as: 'displayName'
|
341
|
+
property :full_name, as: 'fullName'
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
@@ -0,0 +1,201 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module AirqualityV1
|
23
|
+
# Air Quality API
|
24
|
+
#
|
25
|
+
# The Air Quality API.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/airquality_v1'
|
29
|
+
#
|
30
|
+
# Airquality = Google::Apis::AirqualityV1 # Alias the module
|
31
|
+
# service = Airquality::AirQualityService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/maps/documentation/air-quality
|
34
|
+
class AirQualityService < Google::Apis::Core::BaseService
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://airquality.$UNIVERSE_DOMAIN$/"
|
36
|
+
|
37
|
+
# @return [String]
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
49
|
+
client_name: 'google-apis-airquality_v1',
|
50
|
+
client_version: Google::Apis::AirqualityV1::GEM_VERSION)
|
51
|
+
@batch_path = 'batch'
|
52
|
+
end
|
53
|
+
|
54
|
+
# The Current Conditions endpoint provides hourly air quality information in
|
55
|
+
# more than 100 countries, up to a 500 x 500 meters resolution. Includes over 70
|
56
|
+
# local indexes and global air quality index and categories.
|
57
|
+
# @param [Google::Apis::AirqualityV1::LookupCurrentConditionsRequest] lookup_current_conditions_request_object
|
58
|
+
# @param [String] fields
|
59
|
+
# Selector specifying which fields to include in a partial response.
|
60
|
+
# @param [String] quota_user
|
61
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
62
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
63
|
+
# @param [Google::Apis::RequestOptions] options
|
64
|
+
# Request-specific options
|
65
|
+
#
|
66
|
+
# @yield [result, err] Result & error if block supplied
|
67
|
+
# @yieldparam result [Google::Apis::AirqualityV1::LookupCurrentConditionsResponse] parsed result object
|
68
|
+
# @yieldparam err [StandardError] error object if request failed
|
69
|
+
#
|
70
|
+
# @return [Google::Apis::AirqualityV1::LookupCurrentConditionsResponse]
|
71
|
+
#
|
72
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
73
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
74
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
75
|
+
def lookup_current_conditions(lookup_current_conditions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
76
|
+
command = make_simple_command(:post, 'v1/currentConditions:lookup', options)
|
77
|
+
command.request_representation = Google::Apis::AirqualityV1::LookupCurrentConditionsRequest::Representation
|
78
|
+
command.request_object = lookup_current_conditions_request_object
|
79
|
+
command.response_representation = Google::Apis::AirqualityV1::LookupCurrentConditionsResponse::Representation
|
80
|
+
command.response_class = Google::Apis::AirqualityV1::LookupCurrentConditionsResponse
|
81
|
+
command.query['fields'] = fields unless fields.nil?
|
82
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
+
execute_or_queue_command(command, &block)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns air quality forecast for a specific location for a given time range.
|
87
|
+
# @param [Google::Apis::AirqualityV1::LookupForecastRequest] lookup_forecast_request_object
|
88
|
+
# @param [String] fields
|
89
|
+
# Selector specifying which fields to include in a partial response.
|
90
|
+
# @param [String] quota_user
|
91
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
92
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
93
|
+
# @param [Google::Apis::RequestOptions] options
|
94
|
+
# Request-specific options
|
95
|
+
#
|
96
|
+
# @yield [result, err] Result & error if block supplied
|
97
|
+
# @yieldparam result [Google::Apis::AirqualityV1::LookupForecastResponse] parsed result object
|
98
|
+
# @yieldparam err [StandardError] error object if request failed
|
99
|
+
#
|
100
|
+
# @return [Google::Apis::AirqualityV1::LookupForecastResponse]
|
101
|
+
#
|
102
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
103
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
104
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
105
|
+
def lookup_forecast(lookup_forecast_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
106
|
+
command = make_simple_command(:post, 'v1/forecast:lookup', options)
|
107
|
+
command.request_representation = Google::Apis::AirqualityV1::LookupForecastRequest::Representation
|
108
|
+
command.request_object = lookup_forecast_request_object
|
109
|
+
command.response_representation = Google::Apis::AirqualityV1::LookupForecastResponse::Representation
|
110
|
+
command.response_class = Google::Apis::AirqualityV1::LookupForecastResponse
|
111
|
+
command.query['fields'] = fields unless fields.nil?
|
112
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
113
|
+
execute_or_queue_command(command, &block)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Returns air quality history for a specific location for a given time range.
|
117
|
+
# @param [Google::Apis::AirqualityV1::LookupHistoryRequest] lookup_history_request_object
|
118
|
+
# @param [String] fields
|
119
|
+
# Selector specifying which fields to include in a partial response.
|
120
|
+
# @param [String] quota_user
|
121
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
122
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
123
|
+
# @param [Google::Apis::RequestOptions] options
|
124
|
+
# Request-specific options
|
125
|
+
#
|
126
|
+
# @yield [result, err] Result & error if block supplied
|
127
|
+
# @yieldparam result [Google::Apis::AirqualityV1::LookupHistoryResponse] parsed result object
|
128
|
+
# @yieldparam err [StandardError] error object if request failed
|
129
|
+
#
|
130
|
+
# @return [Google::Apis::AirqualityV1::LookupHistoryResponse]
|
131
|
+
#
|
132
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
133
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
134
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
135
|
+
def lookup_history(lookup_history_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
136
|
+
command = make_simple_command(:post, 'v1/history:lookup', options)
|
137
|
+
command.request_representation = Google::Apis::AirqualityV1::LookupHistoryRequest::Representation
|
138
|
+
command.request_object = lookup_history_request_object
|
139
|
+
command.response_representation = Google::Apis::AirqualityV1::LookupHistoryResponse::Representation
|
140
|
+
command.response_class = Google::Apis::AirqualityV1::LookupHistoryResponse
|
141
|
+
command.query['fields'] = fields unless fields.nil?
|
142
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
143
|
+
execute_or_queue_command(command, &block)
|
144
|
+
end
|
145
|
+
|
146
|
+
# Returns a bytes array containing the data of the tile PNG image.
|
147
|
+
# @param [String] map_type
|
148
|
+
# Required. The type of the air quality heatmap. Defines the pollutant that the
|
149
|
+
# map will graphically represent. Allowed values: - UAQI_RED_GREEN (UAQI, red-
|
150
|
+
# green palette) - UAQI_INDIGO_PERSIAN (UAQI, indigo-persian palette) -
|
151
|
+
# PM25_INDIGO_PERSIAN - GBR_DEFRA - DEU_UBA - CAN_EC - FRA_ATMO - US_AQI
|
152
|
+
# @param [Fixnum] zoom
|
153
|
+
# Required. The map's zoom level. Defines how large or small the contents of a
|
154
|
+
# map appear in a map view. Zoom level 0 is the entire world in a single tile.
|
155
|
+
# Zoom level 1 is the entire world in 4 tiles. Zoom level 2 is the entire world
|
156
|
+
# in 16 tiles. Zoom level 16 is the entire world in 65,536 tiles. Allowed values:
|
157
|
+
# 0-16
|
158
|
+
# @param [Fixnum] x
|
159
|
+
# Required. Defines the east-west point in the requested tile.
|
160
|
+
# @param [Fixnum] y
|
161
|
+
# Required. Defines the north-south point in the requested tile.
|
162
|
+
# @param [String] fields
|
163
|
+
# Selector specifying which fields to include in a partial response.
|
164
|
+
# @param [String] quota_user
|
165
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
166
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
167
|
+
# @param [Google::Apis::RequestOptions] options
|
168
|
+
# Request-specific options
|
169
|
+
#
|
170
|
+
# @yield [result, err] Result & error if block supplied
|
171
|
+
# @yieldparam result [Google::Apis::AirqualityV1::HttpBody] parsed result object
|
172
|
+
# @yieldparam err [StandardError] error object if request failed
|
173
|
+
#
|
174
|
+
# @return [Google::Apis::AirqualityV1::HttpBody]
|
175
|
+
#
|
176
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
177
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
178
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
179
|
+
def lookup_map_type_heatmap_tile_heatmap_tile(map_type, zoom, x, y, fields: nil, quota_user: nil, options: nil, &block)
|
180
|
+
command = make_simple_command(:get, 'v1/mapTypes/{mapType}/heatmapTiles/{zoom}/{x}/{y}', options)
|
181
|
+
command.response_representation = Google::Apis::AirqualityV1::HttpBody::Representation
|
182
|
+
command.response_class = Google::Apis::AirqualityV1::HttpBody
|
183
|
+
command.params['mapType'] = map_type unless map_type.nil?
|
184
|
+
command.params['zoom'] = zoom unless zoom.nil?
|
185
|
+
command.params['x'] = x unless x.nil?
|
186
|
+
command.params['y'] = y unless y.nil?
|
187
|
+
command.query['fields'] = fields unless fields.nil?
|
188
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
189
|
+
execute_or_queue_command(command, &block)
|
190
|
+
end
|
191
|
+
|
192
|
+
protected
|
193
|
+
|
194
|
+
def apply_command_defaults(command)
|
195
|
+
command.query['key'] = key unless key.nil?
|
196
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/airquality_v1/service.rb'
|
16
|
+
require 'google/apis/airquality_v1/classes.rb'
|
17
|
+
require 'google/apis/airquality_v1/representations.rb'
|
18
|
+
require 'google/apis/airquality_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Air Quality API
|
23
|
+
#
|
24
|
+
# The Air Quality API.
|
25
|
+
#
|
26
|
+
# @see https://developers.google.com/maps/documentation/air-quality
|
27
|
+
module AirqualityV1
|
28
|
+
# Version of the Air Quality API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1'
|
31
|
+
|
32
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
33
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/airquality_v1"
|