blob: ce8f65ff857954a57dbadfc95cef1a619189d3a7 [file] [log] [blame]
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="playablelocations_v3.html">Playable Locations API</a> . <a href="playablelocations_v3.v3.html">v3</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#logImpressions">logImpressions(body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Logs new events when playable locations are displayed, and when they are</p>
80<p class="toc_element">
81 <code><a href="#logPlayerReports">logPlayerReports(body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Logs bad playable location reports submitted by players.</p>
83<p class="toc_element">
84 <code><a href="#samplePlayableLocations">samplePlayableLocations(body=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns a set of playable locations that lie within a specified area,</p>
86<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="logImpressions">logImpressions(body=None, x__xgafv=None)</code>
89 <pre>Logs new events when playable locations are displayed, and when they are
90interacted with.
91
92Impressions are not partially saved; either all impressions are saved and
93this request succeeds, or no impressions are saved, and this request fails.
94
95Args:
96 body: object, The request body.
97 The object takes the form of:
98
99{ # A request for logging impressions.
100 &quot;requestId&quot;: &quot;A String&quot;, # Required. A string that uniquely identifies the log impressions request. This allows
101 # you to detect duplicate requests. We recommend that you use UUIDs for this
102 # value. The value must not exceed 50 characters.
103 #
104 # You should reuse the `request_id` only when retrying a request in case of
105 # failure. In this case, the request must be identical to the one that
106 # failed.
107 &quot;clientInfo&quot;: { # Client information. # Required. Information about the client device. For example, device model and
108 # operating system.
109 &quot;languageCode&quot;: &quot;A String&quot;, # Language code (in BCP-47 format) indicating the UI language of the client.
110 # Examples are &quot;en&quot;, &quot;en-US&quot; or &quot;ja-Latn&quot;. For more information, see
111 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
112 &quot;operatingSystemBuild&quot;: &quot;A String&quot;, # Build number/version of the operating system. e.g., the contents of
113 # android.os.Build.ID in Android, or the contents of sysctl &quot;kern.osversion&quot;
114 # in iOS.
115 &quot;platform&quot;: &quot;A String&quot;, # Platform where the application is running.
116 &quot;apiClient&quot;: &quot;A String&quot;, # API client name and version. For example, the SDK calling the API. The
117 # exact format is up to the client.
118 &quot;applicationId&quot;: &quot;A String&quot;, # Application ID, such as the package name on Android and the bundle
119 # identifier on iOS platforms.
120 &quot;applicationVersion&quot;: &quot;A String&quot;, # Application version number, such as &quot;1.2.3&quot;. The exact format is
121 # application-dependent.
122 &quot;deviceModel&quot;: &quot;A String&quot;, # Device model as reported by the device. The exact format is
123 # platform-dependent.
124 &quot;operatingSystem&quot;: &quot;A String&quot;, # Operating system name and version as reported by the OS. For example,
125 # &quot;Mac OS X 10.10.4&quot;. The exact format is platform-dependent.
126 },
127 &quot;impressions&quot;: [ # Required. Impression event details. The maximum number of impression reports that you
128 # can log at once is 50.
129 { # Encapsulates impression event details.
130 &quot;impressionType&quot;: &quot;A String&quot;, # Required. The type of impression event.
131 &quot;locationName&quot;: &quot;A String&quot;, # Required. The name of the playable location.
132 &quot;gameObjectType&quot;: 42, # An arbitrary, developer-defined type identifier for each type of game
133 # object used in your game.
134 #
135 # Since players interact with differ types of game objects in different ways,
136 # this field allows you to segregate impression data by type for analysis.
137 #
138 # You should assign a unique `game_object_type` ID to represent a distinct
139 # type of game object in your game.
140 #
141 # For example, 1=monster location, 2=powerup location.
142 },
143 ],
144 }
145
146 x__xgafv: string, V1 error format.
147 Allowed values
148 1 - v1 error format
149 2 - v2 error format
150
151Returns:
152 An object of the form:
153
154 { # A response for the LogImpressions method.
155 # This method returns no data upon success.
156 }</pre>
157</div>
158
159<div class="method">
160 <code class="details" id="logPlayerReports">logPlayerReports(body=None, x__xgafv=None)</code>
161 <pre>Logs bad playable location reports submitted by players.
162
163Reports are not partially saved; either all reports are saved and this
164request succeeds, or no reports are saved, and this request fails.
165
166Args:
167 body: object, The request body.
168 The object takes the form of:
169
170{ # A request for logging your player&#x27;s bad location reports.
171 &quot;playerReports&quot;: [ # Required. Player reports. The maximum number of player reports that you can log at
172 # once is 50.
173 { # A report submitted by a player about a playable location that is considered
174 # inappropriate for use in the game.
175 &quot;reasons&quot;: [ # Required. One or more reasons why this playable location is considered bad.
176 &quot;A String&quot;,
177 ],
178 &quot;locationName&quot;: &quot;A String&quot;, # Required. The name of the playable location.
179 &quot;languageCode&quot;: &quot;A String&quot;, # Language code (in BCP-47 format) indicating the language of the freeform
180 # description provided in `reason_details`. Examples are &quot;en&quot;, &quot;en-US&quot; or
181 # &quot;ja-Latn&quot;. For more information, see
182 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
183 &quot;reasonDetails&quot;: &quot;A String&quot;, # Required. A free-form description detailing why the playable location is
184 # considered bad.
185 },
186 ],
187 &quot;requestId&quot;: &quot;A String&quot;, # Required. A string that uniquely identifies the log player reports request. This
188 # allows you to detect duplicate requests. We recommend that you use UUIDs
189 # for this value. The value must not exceed 50 characters.
190 #
191 # You should reuse the `request_id` only when retrying a request in the case
192 # of a failure. In that case, the request must be identical to the one that
193 # failed.
194 &quot;clientInfo&quot;: { # Client information. # Required. Information about the client device (for example, device model and
195 # operating system).
196 &quot;languageCode&quot;: &quot;A String&quot;, # Language code (in BCP-47 format) indicating the UI language of the client.
197 # Examples are &quot;en&quot;, &quot;en-US&quot; or &quot;ja-Latn&quot;. For more information, see
198 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
199 &quot;operatingSystemBuild&quot;: &quot;A String&quot;, # Build number/version of the operating system. e.g., the contents of
200 # android.os.Build.ID in Android, or the contents of sysctl &quot;kern.osversion&quot;
201 # in iOS.
202 &quot;platform&quot;: &quot;A String&quot;, # Platform where the application is running.
203 &quot;apiClient&quot;: &quot;A String&quot;, # API client name and version. For example, the SDK calling the API. The
204 # exact format is up to the client.
205 &quot;applicationId&quot;: &quot;A String&quot;, # Application ID, such as the package name on Android and the bundle
206 # identifier on iOS platforms.
207 &quot;applicationVersion&quot;: &quot;A String&quot;, # Application version number, such as &quot;1.2.3&quot;. The exact format is
208 # application-dependent.
209 &quot;deviceModel&quot;: &quot;A String&quot;, # Device model as reported by the device. The exact format is
210 # platform-dependent.
211 &quot;operatingSystem&quot;: &quot;A String&quot;, # Operating system name and version as reported by the OS. For example,
212 # &quot;Mac OS X 10.10.4&quot;. The exact format is platform-dependent.
213 },
214 }
215
216 x__xgafv: string, V1 error format.
217 Allowed values
218 1 - v1 error format
219 2 - v2 error format
220
221Returns:
222 An object of the form:
223
224 { # A response for the LogPlayerReports
225 # method.
226 #
227 # This method returns no data upon success.
228 }</pre>
229</div>
230
231<div class="method">
232 <code class="details" id="samplePlayableLocations">samplePlayableLocations(body=None, x__xgafv=None)</code>
233 <pre>Returns a set of playable locations that lie within a specified area,
234that satisfy optional filter criteria.
235
236Note: Identical `SamplePlayableLocations` requests can return different
237results as the state of the world changes over time.
238
239Args:
240 body: object, The request body.
241 The object takes the form of:
242
243{ #
244 # Life of a query:
245 #
246 # - When a game starts in a new location, your game server issues a
247 # SamplePlayableLocations
248 # request. The request specifies the S2 cell, and contains one or more
249 # &quot;criteria&quot; for filtering:
250 #
251 # - Criterion 0: i locations for long-lived bases, or level 0 monsters, or...
252 # - Criterion 1: j locations for short-lived bases, or level 1 monsters, ...
253 # - Criterion 2: k locations for random objects.
254 # - etc (up to 5 criterion may be specified).
255 #
256 # `PlayableLocationList` will then contain mutually
257 # exclusive lists of `PlayableLocation` objects that satisfy each of
258 # the criteria. Think of it as a collection of real-world locations that you
259 # can then associate with your game state.
260 #
261 # Note: These points are impermanent in nature. E.g, parks can close, and
262 # places can be removed.
263 #
264 # The response specifies how long you can expect the playable locations to
265 # last. Once they expire, you should query the `samplePlayableLocations` API
266 # again to get a fresh view of the real world.
267 &quot;areaFilter&quot;: { # Specifies the area to search for playable locations. # Required. Specifies the area to search within for playable locations.
268 &quot;s2CellId&quot;: &quot;A String&quot;, # Required. The S2 cell ID of the area you want. This must be between cell level 11 and
269 # 14 (inclusive).
270 #
271 # S2 cells are 64-bit integers that identify areas on the Earth. They are
272 # hierarchical, and can therefore be used for spatial indexing.
273 #
274 # The S2 geometry library is available in a number of languages:
275 #
276 # * [C++](https://github.com/google/s2geometry)
277 # * [Java](https://github.com/google/s2-geometry-library-java)
278 # * [Go](https://github.com/golang/geo)
279 # * [Python](https://github.com/google/s2geometry/tree/master/src/python)
280 },
281 &quot;criteria&quot;: [ # Required. Specifies one or more (up to 5) criteria for filtering the
282 # returned playable locations.
283 { # Encapsulates a filter criterion for searching for a set of playable
284 # locations.
285 &quot;filter&quot;: { # Specifies the filters to use when searching for playable locations. # Specifies filtering options, and specifies what will be included in the
286 # result set.
287 &quot;maxLocationCount&quot;: 42, # Specifies the maximum number of playable locations to return. This value
288 # must not be greater than 1000. The default value is 100.
289 #
290 # Only the top-ranking playable locations are returned.
291 &quot;includedTypes&quot;: [ # Restricts the set of playable locations to just the
292 # [types](/maps/documentation/gaming/tt/types) that you want.
293 &quot;A String&quot;,
294 ],
295 &quot;spacing&quot;: { # A set of options that specifies the separation between playable locations. # A set of options that control the spacing between playable locations. By
296 # default the minimum distance between locations is 200m.
297 &quot;minSpacingMeters&quot;: 3.14, # Required. The minimum spacing between any two playable locations, measured in meters.
298 # The minimum value is 30.
299 # The maximum value is 1000.
300 #
301 # Inputs will be rounded up to the next 10 meter interval.
302 #
303 # The default value is 200m.
304 #
305 # Set this field to remove tight clusters of playable locations.
306 #
307 # Note:
308 #
309 # The spacing is a greedy algorithm. It optimizes for selecting the highest
310 # ranking locations first, not to maximize the number of locations selected.
311 # Consider the following scenario:
312 #
313 # * Rank: A: 2, B: 1, C: 3.
314 # * Distance: A--200m--B--200m--C
315 #
316 # If spacing=250, it will pick the highest ranked location [B], not [A, C].
317 #
318 #
319 # Note:
320 #
321 # Spacing works within the game object type itself, as well as the previous
322 # ones.
323 # Suppose three game object types, each with the following spacing:
324 #
325 # * X: 400m, Y: undefined, Z: 200m.
326 #
327 # 1. Add locations for X, within 400m of each other.
328 # 2. Add locations for Y, without any spacing.
329 # 3. Finally, add locations for Z within 200m of each other as well X and Y.
330 #
331 # The distance diagram between those locations end up as:
332 #
333 # * From-&gt;To.
334 # * X-&gt;X: 400m
335 # * Y-&gt;X, Y-&gt;Y: unspecified.
336 # * Z-&gt;X, Z-&gt;Y, Z-&gt;Z: 200m.
337 &quot;pointType&quot;: &quot;A String&quot;, # Specifies whether the minimum spacing constraint applies to the
338 # center-point or to the snapped point of playable locations. The default
339 # value is `CENTER_POINT`.
340 #
341 # If a snapped point is not available for a playable location, its
342 # center-point is used instead.
343 #
344 # Set this to the point type used in your game.
345 },
346 },
347 &quot;fieldsToReturn&quot;: &quot;A String&quot;, # Specifies which `PlayableLocation` fields are returned.
348 #
349 # `name` (which is used for logging impressions), `center_point` and
350 # `place_id` (or `plus_code`) are always returned.
351 #
352 # The following fields are omitted unless you specify them here:
353 #
354 # * snapped_point
355 # * types
356 #
357 # Note: The more fields you include, the more expensive in terms of data and
358 # associated latency your query will be.
359 &quot;gameObjectType&quot;: 42, # Required. An arbitrary, developer-defined identifier of the type of game object that
360 # the playable location is used for. This field allows you to specify
361 # criteria per game object type when searching for playable locations.
362 #
363 # You should assign a unique `game_object_type` ID across all
364 # `request_criteria` to represent a distinct type of game object. For
365 # example, 1=monster location, 2=powerup location.
366 #
367 # The response contains a map&lt;game_object_type, Response&gt;.
368 },
369 ],
370 }
371
372 x__xgafv: string, V1 error format.
373 Allowed values
374 1 - v1 error format
375 2 - v2 error format
376
377Returns:
378 An object of the form:
379
380 { #
381 # Response for the
382 # SamplePlayableLocations
383 # method.
384 &quot;ttl&quot;: &quot;A String&quot;, # Required. Specifies the &quot;time-to-live&quot; for the set of playable locations. You can use
385 # this value to determine how long to cache the set of playable locations.
386 # After this length of time, your back-end game server should issue a new
387 # SamplePlayableLocations
388 # request to get a fresh set of playable locations (because for example, they
389 # might have been removed, a park might have closed for the day, a
390 # business might have closed permanently).
391 &quot;locationsPerGameObjectType&quot;: { # Each PlayableLocation object corresponds to a game_object_type specified
392 # in the request.
393 &quot;a_key&quot;: { # A list of PlayableLocation objects that satisfies a single Criterion.
394 &quot;locations&quot;: [ # A list of playable locations for this game object type.
395 { # A geographical point suitable for placing game objects in location-based
396 # games.
397 &quot;plusCode&quot;: &quot;A String&quot;, # A [plus code] (http://openlocationcode.com)
398 &quot;centerPoint&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Required. The latitude and longitude associated with the center of the playable
399 # location.
400 #
401 # By default, the set of playable locations returned from
402 # SamplePlayableLocations use
403 # center-point coordinates.
404 # of doubles representing degrees latitude and degrees longitude. Unless
405 # specified otherwise, this must conform to the
406 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
407 # standard&lt;/a&gt;. Values must be within normalized ranges.
408 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
409 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
410 },
411 &quot;name&quot;: &quot;A String&quot;, # Required. The name of this playable location.
412 &quot;placeId&quot;: &quot;A String&quot;, # A [place ID] (https://developers.google.com/places/place-id)
413 &quot;snappedPoint&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # The playable location&#x27;s coordinates, snapped to the sidewalk of the
414 # nearest road, if a nearby road exists.
415 # of doubles representing degrees latitude and degrees longitude. Unless
416 # specified otherwise, this must conform to the
417 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
418 # standard&lt;/a&gt;. Values must be within normalized ranges.
419 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
420 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
421 },
422 &quot;types&quot;: [ # A collection of [Playable Location
423 # Types](/maps/documentation/gaming/tt/types) for this playable location. The
424 # first type in the collection is the primary type.
425 #
426 # Type information might not be available for all playable locations.
427 &quot;A String&quot;,
428 ],
429 },
430 ],
431 },
432 },
433 }</pre>
434</div>
435
436</body></html>