blob: 1d59830e160135ff1df2e981a14e14992ef38dce [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070081 <code><a href="#logImpressions">logImpressions(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Logs new events when playable locations are displayed, and when they are interacted with. Impressions are not partially saved; either all impressions are saved and this request succeeds, or no impressions are saved, and this request fails.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070083<p class="toc_element">
84 <code><a href="#logPlayerReports">logPlayerReports(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Logs bad playable location reports submitted by players. Reports are not partially saved; either all reports are saved and this request succeeds, or no reports are saved, and this request fails.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070086<p class="toc_element">
87 <code><a href="#samplePlayableLocations">samplePlayableLocations(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Returns a set of playable locations that lie within a specified area, that satisfy optional filter criteria. Note: Identical `SamplePlayableLocations` requests can return different results as the state of the world changes over time.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070089<h3>Method Details</h3>
90<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091 <code class="details" id="close">close()</code>
92 <pre>Close httplib2 connections.</pre>
93</div>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070094
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070095<div class="method">
96 <code class="details" id="logImpressions">logImpressions(body=None, x__xgafv=None)</code>
97 <pre>Logs new events when playable locations are displayed, and when they are interacted with. Impressions are not partially saved; either all impressions are saved and this request succeeds, or no impressions are saved, and this request fails.
Bu Sun Kimd059ad82020-07-22 17:02:09 -070098
99Args:
100 body: object, The request body.
101 The object takes the form of:
102
103{ # A request for logging impressions.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800104 &quot;clientInfo&quot;: { # Client information. # Required. Information about the client device. For example, device model and operating system.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800105 &quot;operatingSystemBuild&quot;: &quot;A String&quot;, # Build number/version of the operating system. e.g., the contents of android.os.Build.ID in Android, or the contents of sysctl &quot;kern.osversion&quot; in iOS.
106 &quot;languageCode&quot;: &quot;A String&quot;, # Language code (in BCP-47 format) indicating the UI language of the client. Examples are &quot;en&quot;, &quot;en-US&quot; or &quot;ja-Latn&quot;. For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
107 &quot;operatingSystem&quot;: &quot;A String&quot;, # Operating system name and version as reported by the OS. For example, &quot;Mac OS X 10.10.4&quot;. The exact format is platform-dependent.
108 &quot;apiClient&quot;: &quot;A String&quot;, # API client name and version. For example, the SDK calling the API. The exact format is up to the client.
109 &quot;applicationVersion&quot;: &quot;A String&quot;, # Application version number, such as &quot;1.2.3&quot;. The exact format is application-dependent.
110 &quot;platform&quot;: &quot;A String&quot;, # Platform where the application is running.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800111 &quot;deviceModel&quot;: &quot;A String&quot;, # Device model as reported by the device. The exact format is platform-dependent.
112 &quot;applicationId&quot;: &quot;A String&quot;, # Application ID, such as the package name on Android and the bundle identifier on iOS platforms.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800113 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800114 &quot;impressions&quot;: [ # Required. Impression event details. The maximum number of impression reports that you can log at once is 50.
115 { # Encapsulates impression event details.
116 &quot;locationName&quot;: &quot;A String&quot;, # Required. The name of the playable location.
117 &quot;gameObjectType&quot;: 42, # An arbitrary, developer-defined type identifier for each type of game object used in your game. Since players interact with differ types of game objects in different ways, this field allows you to segregate impression data by type for analysis. You should assign a unique `game_object_type` ID to represent a distinct type of game object in your game. For example, 1=monster location, 2=powerup location.
118 &quot;impressionType&quot;: &quot;A String&quot;, # Required. The type of impression event.
119 },
120 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800121 &quot;requestId&quot;: &quot;A String&quot;, # Required. A string that uniquely identifies the log impressions request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters. You should reuse the `request_id` only when retrying a request in case of failure. In this case, the request must be identical to the one that failed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700122 }
123
124 x__xgafv: string, V1 error format.
125 Allowed values
126 1 - v1 error format
127 2 - v2 error format
128
129Returns:
130 An object of the form:
131
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700132 { # A response for the LogImpressions method. This method returns no data upon success.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700133 }</pre>
134</div>
135
136<div class="method">
137 <code class="details" id="logPlayerReports">logPlayerReports(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 <pre>Logs bad playable location reports submitted by players. Reports are not partially saved; either all reports are saved and this request succeeds, or no reports are saved, and this request fails.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700139
140Args:
141 body: object, The request body.
142 The object takes the form of:
143
144{ # A request for logging your player&#x27;s bad location reports.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700145 &quot;clientInfo&quot;: { # Client information. # Required. Information about the client device (for example, device model and operating system).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800146 &quot;operatingSystemBuild&quot;: &quot;A String&quot;, # Build number/version of the operating system. e.g., the contents of android.os.Build.ID in Android, or the contents of sysctl &quot;kern.osversion&quot; in iOS.
147 &quot;languageCode&quot;: &quot;A String&quot;, # Language code (in BCP-47 format) indicating the UI language of the client. Examples are &quot;en&quot;, &quot;en-US&quot; or &quot;ja-Latn&quot;. For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
148 &quot;operatingSystem&quot;: &quot;A String&quot;, # Operating system name and version as reported by the OS. For example, &quot;Mac OS X 10.10.4&quot;. The exact format is platform-dependent.
149 &quot;apiClient&quot;: &quot;A String&quot;, # API client name and version. For example, the SDK calling the API. The exact format is up to the client.
150 &quot;applicationVersion&quot;: &quot;A String&quot;, # Application version number, such as &quot;1.2.3&quot;. The exact format is application-dependent.
151 &quot;platform&quot;: &quot;A String&quot;, # Platform where the application is running.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700152 &quot;deviceModel&quot;: &quot;A String&quot;, # Device model as reported by the device. The exact format is platform-dependent.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800153 &quot;applicationId&quot;: &quot;A String&quot;, # Application ID, such as the package name on Android and the bundle identifier on iOS platforms.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700154 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800155 &quot;playerReports&quot;: [ # Required. Player reports. The maximum number of player reports that you can log at once is 50.
156 { # A report submitted by a player about a playable location that is considered inappropriate for use in the game.
157 &quot;reasons&quot;: [ # Required. One or more reasons why this playable location is considered bad.
158 &quot;A String&quot;,
159 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800160 &quot;reasonDetails&quot;: &quot;A String&quot;, # Required. A free-form description detailing why the playable location is considered bad.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800161 &quot;locationName&quot;: &quot;A String&quot;, # Required. The name of the playable location.
162 &quot;languageCode&quot;: &quot;A String&quot;, # Language code (in BCP-47 format) indicating the language of the freeform description provided in `reason_details`. Examples are &quot;en&quot;, &quot;en-US&quot; or &quot;ja-Latn&quot;. For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800163 },
164 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800165 &quot;requestId&quot;: &quot;A String&quot;, # Required. A string that uniquely identifies the log player reports request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters. You should reuse the `request_id` only when retrying a request in the case of a failure. In that case, the request must be identical to the one that failed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700166 }
167
168 x__xgafv: string, V1 error format.
169 Allowed values
170 1 - v1 error format
171 2 - v2 error format
172
173Returns:
174 An object of the form:
175
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700176 { # A response for the LogPlayerReports method. This method returns no data upon success.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700177 }</pre>
178</div>
179
180<div class="method">
181 <code class="details" id="samplePlayableLocations">samplePlayableLocations(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700182 <pre>Returns a set of playable locations that lie within a specified area, that satisfy optional filter criteria. Note: Identical `SamplePlayableLocations` requests can return different results as the state of the world changes over time.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700183
184Args:
185 body: object, The request body.
186 The object takes the form of:
187
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700188{ # Life of a query: - When a game starts in a new location, your game server issues a SamplePlayableLocations request. The request specifies the S2 cell, and contains one or more &quot;criteria&quot; for filtering: - Criterion 0: i locations for long-lived bases, or level 0 monsters, or... - Criterion 1: j locations for short-lived bases, or level 1 monsters, ... - Criterion 2: k locations for random objects. - etc (up to 5 criterion may be specified). `PlayableLocationList` will then contain mutually exclusive lists of `PlayableLocation` objects that satisfy each of the criteria. Think of it as a collection of real-world locations that you can then associate with your game state. Note: These points are impermanent in nature. E.g, parks can close, and places can be removed. The response specifies how long you can expect the playable locations to last. Once they expire, you should query the `samplePlayableLocations` API again to get a fresh view of the real world.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 &quot;criteria&quot;: [ # Required. Specifies one or more (up to 5) criteria for filtering the returned playable locations.
190 { # Encapsulates a filter criterion for searching for a set of playable locations.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800191 &quot;fieldsToReturn&quot;: &quot;A String&quot;, # Specifies which `PlayableLocation` fields are returned. `name` (which is used for logging impressions), `center_point` and `place_id` (or `plus_code`) are always returned. The following fields are omitted unless you specify them here: * snapped_point * types Note: The more fields you include, the more expensive in terms of data and associated latency your query will be.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700192 &quot;gameObjectType&quot;: 42, # Required. An arbitrary, developer-defined identifier of the type of game object that the playable location is used for. This field allows you to specify criteria per game object type when searching for playable locations. You should assign a unique `game_object_type` ID across all `request_criteria` to represent a distinct type of game object. For example, 1=monster location, 2=powerup location. The response contains a map.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700193 &quot;filter&quot;: { # Specifies the filters to use when searching for playable locations. # Specifies filtering options, and specifies what will be included in the result set.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800194 &quot;maxLocationCount&quot;: 42, # Specifies the maximum number of playable locations to return. This value must not be greater than 1000. The default value is 100. Only the top-ranking playable locations are returned.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800195 &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 default the minimum distance between locations is 200m.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800196 &quot;pointType&quot;: &quot;A String&quot;, # Specifies whether the minimum spacing constraint applies to the center-point or to the snapped point of playable locations. The default value is `CENTER_POINT`. If a snapped point is not available for a playable location, its center-point is used instead. Set this to the point type used in your game.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800197 &quot;minSpacingMeters&quot;: 3.14, # Required. The minimum spacing between any two playable locations, measured in meters. The minimum value is 30. The maximum value is 1000. Inputs will be rounded up to the next 10 meter interval. The default value is 200m. Set this field to remove tight clusters of playable locations. Note: The spacing is a greedy algorithm. It optimizes for selecting the highest ranking locations first, not to maximize the number of locations selected. Consider the following scenario: * Rank: A: 2, B: 1, C: 3. * Distance: A--200m--B--200m--C If spacing=250, it will pick the highest ranked location [B], not [A, C]. Note: Spacing works within the game object type itself, as well as the previous ones. Suppose three game object types, each with the following spacing: * X: 400m, Y: undefined, Z: 200m. 1. Add locations for X, within 400m of each other. 2. Add locations for Y, without any spacing. 3. Finally, add locations for Z within 200m of each other as well X and Y. The distance diagram between those locations end up as: * From-&gt;To. * X-&gt;X: 400m * Y-&gt;X, Y-&gt;Y: unspecified. * Z-&gt;X, Z-&gt;Y, Z-&gt;Z: 200m.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800198 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700199 &quot;includedTypes&quot;: [ # Restricts the set of playable locations to just the [types](/maps/documentation/gaming/tt/types) that you want.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700200 &quot;A String&quot;,
201 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700202 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700203 },
204 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800205 &quot;areaFilter&quot;: { # Specifies the area to search for playable locations. # Required. Specifies the area to search within for playable locations.
206 &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 14 (inclusive). S2 cells are 64-bit integers that identify areas on the Earth. They are hierarchical, and can therefore be used for spatial indexing. The S2 geometry library is available in a number of languages: * [C++](https://github.com/google/s2geometry) * [Java](https://github.com/google/s2-geometry-library-java) * [Go](https://github.com/golang/geo) * [Python](https://github.com/google/s2geometry/tree/master/src/python)
207 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700208 }
209
210 x__xgafv: string, V1 error format.
211 Allowed values
212 1 - v1 error format
213 2 - v2 error format
214
215Returns:
216 An object of the form:
217
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700218 { # Response for the SamplePlayableLocations method.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800219 &quot;ttl&quot;: &quot;A String&quot;, # Required. Specifies the &quot;time-to-live&quot; for the set of playable locations. You can use this value to determine how long to cache the set of playable locations. After this length of time, your back-end game server should issue a new SamplePlayableLocations request to get a fresh set of playable locations (because for example, they might have been removed, a park might have closed for the day, a business might have closed permanently).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700220 &quot;locationsPerGameObjectType&quot;: { # Each PlayableLocation object corresponds to a game_object_type specified in the request.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700221 &quot;a_key&quot;: { # A list of PlayableLocation objects that satisfies a single Criterion.
222 &quot;locations&quot;: [ # A list of playable locations for this game object type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700223 { # A geographical point suitable for placing game objects in location-based games.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800224 &quot;plusCode&quot;: &quot;A String&quot;, # A [plus code] (http://openlocationcode.com)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800225 &quot;snappedPoint&quot;: { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. # The playable location&#x27;s coordinates, snapped to the sidewalk of the nearest road, if a nearby road exists.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800226 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700227 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700228 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700229 &quot;types&quot;: [ # A collection of [Playable Location Types](/maps/documentation/gaming/tt/types) for this playable location. The first type in the collection is the primary type. Type information might not be available for all playable locations.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700230 &quot;A String&quot;,
231 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800232 &quot;name&quot;: &quot;A String&quot;, # Required. The name of this playable location.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800233 &quot;placeId&quot;: &quot;A String&quot;, # A [place ID] (https://developers.google.com/places/place-id)
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800234 &quot;centerPoint&quot;: { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. # Required. The latitude and longitude associated with the center of the playable location. By default, the set of playable locations returned from SamplePlayableLocations use center-point coordinates.
235 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
236 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
237 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700238 },
239 ],
240 },
241 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700242 }</pre>
243</div>
244
245</body></html>