google-apis-playablelocations_v3 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.
@@ -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 PlayablelocationsV3
18
+ # Version of the google-apis-playablelocations_v3 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201013"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,273 @@
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 PlayablelocationsV3
24
+
25
+ class GoogleMapsPlayablelocationsV3Impression
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class GoogleMapsPlayablelocationsV3LogImpressionsRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class GoogleMapsPlayablelocationsV3LogImpressionsResponse
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class GoogleMapsPlayablelocationsV3LogPlayerReportsRequest
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GoogleMapsPlayablelocationsV3LogPlayerReportsResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class GoogleMapsPlayablelocationsV3PlayerReport
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class GoogleMapsPlayablelocationsV3SampleAreaFilter
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class GoogleMapsPlayablelocationsV3SampleCriterion
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class GoogleMapsPlayablelocationsV3SampleFilter
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocation
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocationList
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class GoogleMapsPlayablelocationsV3SampleSpacingOptions
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class GoogleMapsUnityClientInfo
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class GoogleTypeLatLng
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class GoogleMapsPlayablelocationsV3Impression
122
+ # @private
123
+ class Representation < Google::Apis::Core::JsonRepresentation
124
+ property :game_object_type, as: 'gameObjectType'
125
+ property :impression_type, as: 'impressionType'
126
+ property :location_name, as: 'locationName'
127
+ end
128
+ end
129
+
130
+ class GoogleMapsPlayablelocationsV3LogImpressionsRequest
131
+ # @private
132
+ class Representation < Google::Apis::Core::JsonRepresentation
133
+ property :client_info, as: 'clientInfo', class: Google::Apis::PlayablelocationsV3::GoogleMapsUnityClientInfo, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsUnityClientInfo::Representation
134
+
135
+ collection :impressions, as: 'impressions', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3Impression, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3Impression::Representation
136
+
137
+ property :request_id, as: 'requestId'
138
+ end
139
+ end
140
+
141
+ class GoogleMapsPlayablelocationsV3LogImpressionsResponse
142
+ # @private
143
+ class Representation < Google::Apis::Core::JsonRepresentation
144
+ end
145
+ end
146
+
147
+ class GoogleMapsPlayablelocationsV3LogPlayerReportsRequest
148
+ # @private
149
+ class Representation < Google::Apis::Core::JsonRepresentation
150
+ property :client_info, as: 'clientInfo', class: Google::Apis::PlayablelocationsV3::GoogleMapsUnityClientInfo, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsUnityClientInfo::Representation
151
+
152
+ collection :player_reports, as: 'playerReports', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3PlayerReport, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3PlayerReport::Representation
153
+
154
+ property :request_id, as: 'requestId'
155
+ end
156
+ end
157
+
158
+ class GoogleMapsPlayablelocationsV3LogPlayerReportsResponse
159
+ # @private
160
+ class Representation < Google::Apis::Core::JsonRepresentation
161
+ end
162
+ end
163
+
164
+ class GoogleMapsPlayablelocationsV3PlayerReport
165
+ # @private
166
+ class Representation < Google::Apis::Core::JsonRepresentation
167
+ property :language_code, as: 'languageCode'
168
+ property :location_name, as: 'locationName'
169
+ property :reason_details, as: 'reasonDetails'
170
+ collection :reasons, as: 'reasons'
171
+ end
172
+ end
173
+
174
+ class GoogleMapsPlayablelocationsV3SampleAreaFilter
175
+ # @private
176
+ class Representation < Google::Apis::Core::JsonRepresentation
177
+ property :s2_cell_id, :numeric_string => true, as: 's2CellId'
178
+ end
179
+ end
180
+
181
+ class GoogleMapsPlayablelocationsV3SampleCriterion
182
+ # @private
183
+ class Representation < Google::Apis::Core::JsonRepresentation
184
+ property :fields_to_return, as: 'fieldsToReturn'
185
+ property :filter, as: 'filter', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleFilter, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleFilter::Representation
186
+
187
+ property :game_object_type, as: 'gameObjectType'
188
+ end
189
+ end
190
+
191
+ class GoogleMapsPlayablelocationsV3SampleFilter
192
+ # @private
193
+ class Representation < Google::Apis::Core::JsonRepresentation
194
+ collection :included_types, as: 'includedTypes'
195
+ property :max_location_count, as: 'maxLocationCount'
196
+ property :spacing, as: 'spacing', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleSpacingOptions, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleSpacingOptions::Representation
197
+
198
+ end
199
+ end
200
+
201
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocation
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ property :center_point, as: 'centerPoint', class: Google::Apis::PlayablelocationsV3::GoogleTypeLatLng, decorator: Google::Apis::PlayablelocationsV3::GoogleTypeLatLng::Representation
205
+
206
+ property :name, as: 'name'
207
+ property :place_id, as: 'placeId'
208
+ property :plus_code, as: 'plusCode'
209
+ property :snapped_point, as: 'snappedPoint', class: Google::Apis::PlayablelocationsV3::GoogleTypeLatLng, decorator: Google::Apis::PlayablelocationsV3::GoogleTypeLatLng::Representation
210
+
211
+ collection :types, as: 'types'
212
+ end
213
+ end
214
+
215
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocationList
216
+ # @private
217
+ class Representation < Google::Apis::Core::JsonRepresentation
218
+ collection :locations, as: 'locations', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocation, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocation::Representation
219
+
220
+ end
221
+ end
222
+
223
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest
224
+ # @private
225
+ class Representation < Google::Apis::Core::JsonRepresentation
226
+ property :area_filter, as: 'areaFilter', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleAreaFilter, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleAreaFilter::Representation
227
+
228
+ collection :criteria, as: 'criteria', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleCriterion, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SampleCriterion::Representation
229
+
230
+ end
231
+ end
232
+
233
+ class GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse
234
+ # @private
235
+ class Representation < Google::Apis::Core::JsonRepresentation
236
+ hash :locations_per_game_object_type, as: 'locationsPerGameObjectType', class: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationList, decorator: Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationList::Representation
237
+
238
+ property :ttl, as: 'ttl'
239
+ end
240
+ end
241
+
242
+ class GoogleMapsPlayablelocationsV3SampleSpacingOptions
243
+ # @private
244
+ class Representation < Google::Apis::Core::JsonRepresentation
245
+ property :min_spacing_meters, as: 'minSpacingMeters'
246
+ property :point_type, as: 'pointType'
247
+ end
248
+ end
249
+
250
+ class GoogleMapsUnityClientInfo
251
+ # @private
252
+ class Representation < Google::Apis::Core::JsonRepresentation
253
+ property :api_client, as: 'apiClient'
254
+ property :application_id, as: 'applicationId'
255
+ property :application_version, as: 'applicationVersion'
256
+ property :device_model, as: 'deviceModel'
257
+ property :language_code, as: 'languageCode'
258
+ property :operating_system, as: 'operatingSystem'
259
+ property :operating_system_build, as: 'operatingSystemBuild'
260
+ property :platform, as: 'platform'
261
+ end
262
+ end
263
+
264
+ class GoogleTypeLatLng
265
+ # @private
266
+ class Representation < Google::Apis::Core::JsonRepresentation
267
+ property :latitude, as: 'latitude'
268
+ property :longitude, as: 'longitude'
269
+ end
270
+ end
271
+ end
272
+ end
273
+ end
@@ -0,0 +1,159 @@
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 PlayablelocationsV3
23
+ # Playable Locations API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/playablelocations_v3'
29
+ #
30
+ # Playablelocations = Google::Apis::PlayablelocationsV3 # Alias the module
31
+ # service = Playablelocations::PlayableLocationsService.new
32
+ #
33
+ # @see https://developers.google.com/maps/contact-sales/
34
+ class PlayableLocationsService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://playablelocations.googleapis.com/', '',
47
+ client_name: 'google-apis-playablelocations_v3',
48
+ client_version: Google::Apis::PlayablelocationsV3::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Logs new events when playable locations are displayed, and when they are
53
+ # interacted with. Impressions are not partially saved; either all impressions
54
+ # are saved and this request succeeds, or no impressions are saved, and this
55
+ # request fails.
56
+ # @param [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogImpressionsRequest] google_maps_playablelocations_v3_log_impressions_request_object
57
+ # @param [String] fields
58
+ # Selector specifying which fields to include in a partial response.
59
+ # @param [String] quota_user
60
+ # Available to use for quota purposes for server-side applications. Can be any
61
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
62
+ # @param [Google::Apis::RequestOptions] options
63
+ # Request-specific options
64
+ #
65
+ # @yield [result, err] Result & error if block supplied
66
+ # @yieldparam result [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogImpressionsResponse] parsed result object
67
+ # @yieldparam err [StandardError] error object if request failed
68
+ #
69
+ # @return [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogImpressionsResponse]
70
+ #
71
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
74
+ def log_impressions(google_maps_playablelocations_v3_log_impressions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
75
+ command = make_simple_command(:post, 'v3:logImpressions', options)
76
+ command.request_representation = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogImpressionsRequest::Representation
77
+ command.request_object = google_maps_playablelocations_v3_log_impressions_request_object
78
+ command.response_representation = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogImpressionsResponse::Representation
79
+ command.response_class = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogImpressionsResponse
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Logs bad playable location reports submitted by players. Reports are not
86
+ # partially saved; either all reports are saved and this request succeeds, or no
87
+ # reports are saved, and this request fails.
88
+ # @param [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogPlayerReportsRequest] google_maps_playablelocations_v3_log_player_reports_request_object
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogPlayerReportsResponse] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogPlayerReportsResponse]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def log_player_reports(google_maps_playablelocations_v3_log_player_reports_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:post, 'v3:logPlayerReports', options)
108
+ command.request_representation = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogPlayerReportsRequest::Representation
109
+ command.request_object = google_maps_playablelocations_v3_log_player_reports_request_object
110
+ command.response_representation = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogPlayerReportsResponse::Representation
111
+ command.response_class = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3LogPlayerReportsResponse
112
+ command.query['fields'] = fields unless fields.nil?
113
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
114
+ execute_or_queue_command(command, &block)
115
+ end
116
+
117
+ # Returns a set of playable locations that lie within a specified area, that
118
+ # satisfy optional filter criteria. Note: Identical `SamplePlayableLocations`
119
+ # requests can return different results as the state of the world changes over
120
+ # time.
121
+ # @param [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest] google_maps_playablelocations_v3_sample_playable_locations_request_object
122
+ # @param [String] fields
123
+ # Selector specifying which fields to include in a partial response.
124
+ # @param [String] quota_user
125
+ # Available to use for quota purposes for server-side applications. Can be any
126
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
127
+ # @param [Google::Apis::RequestOptions] options
128
+ # Request-specific options
129
+ #
130
+ # @yield [result, err] Result & error if block supplied
131
+ # @yieldparam result [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse] parsed result object
132
+ # @yieldparam err [StandardError] error object if request failed
133
+ #
134
+ # @return [Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse]
135
+ #
136
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
137
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
138
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
139
+ def sample_playable_locations(google_maps_playablelocations_v3_sample_playable_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
140
+ command = make_simple_command(:post, 'v3:samplePlayableLocations', options)
141
+ command.request_representation = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest::Representation
142
+ command.request_object = google_maps_playablelocations_v3_sample_playable_locations_request_object
143
+ command.response_representation = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse::Representation
144
+ command.response_class = Google::Apis::PlayablelocationsV3::GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse
145
+ command.query['fields'] = fields unless fields.nil?
146
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
147
+ execute_or_queue_command(command, &block)
148
+ end
149
+
150
+ protected
151
+
152
+ def apply_command_defaults(command)
153
+ command.query['key'] = key unless key.nil?
154
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
155
+ end
156
+ end
157
+ end
158
+ end
159
+ end