Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 |
| 90 | interacted with. |
| 91 | |
| 92 | Impressions are not partially saved; either all impressions are saved and |
| 93 | this request succeeds, or no impressions are saved, and this request fails. |
| 94 | |
| 95 | Args: |
| 96 | body: object, The request body. |
| 97 | The object takes the form of: |
| 98 | |
| 99 | { # A request for logging impressions. |
| 100 | "requestId": "A String", # 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 | "clientInfo": { # Client information. # Required. Information about the client device. For example, device model and |
| 108 | # operating system. |
| 109 | "languageCode": "A String", # Language code (in BCP-47 format) indicating the UI language of the client. |
| 110 | # Examples are "en", "en-US" or "ja-Latn". For more information, see |
| 111 | # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. |
| 112 | "operatingSystemBuild": "A String", # Build number/version of the operating system. e.g., the contents of |
| 113 | # android.os.Build.ID in Android, or the contents of sysctl "kern.osversion" |
| 114 | # in iOS. |
| 115 | "platform": "A String", # Platform where the application is running. |
| 116 | "apiClient": "A String", # API client name and version. For example, the SDK calling the API. The |
| 117 | # exact format is up to the client. |
| 118 | "applicationId": "A String", # Application ID, such as the package name on Android and the bundle |
| 119 | # identifier on iOS platforms. |
| 120 | "applicationVersion": "A String", # Application version number, such as "1.2.3". The exact format is |
| 121 | # application-dependent. |
| 122 | "deviceModel": "A String", # Device model as reported by the device. The exact format is |
| 123 | # platform-dependent. |
| 124 | "operatingSystem": "A String", # Operating system name and version as reported by the OS. For example, |
| 125 | # "Mac OS X 10.10.4". The exact format is platform-dependent. |
| 126 | }, |
| 127 | "impressions": [ # 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 | "impressionType": "A String", # Required. The type of impression event. |
| 131 | "locationName": "A String", # Required. The name of the playable location. |
| 132 | "gameObjectType": 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 | |
| 151 | Returns: |
| 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 | |
| 163 | Reports are not partially saved; either all reports are saved and this |
| 164 | request succeeds, or no reports are saved, and this request fails. |
| 165 | |
| 166 | Args: |
| 167 | body: object, The request body. |
| 168 | The object takes the form of: |
| 169 | |
| 170 | { # A request for logging your player's bad location reports. |
| 171 | "playerReports": [ # 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 | "reasons": [ # Required. One or more reasons why this playable location is considered bad. |
| 176 | "A String", |
| 177 | ], |
| 178 | "locationName": "A String", # Required. The name of the playable location. |
| 179 | "languageCode": "A String", # Language code (in BCP-47 format) indicating the language of the freeform |
| 180 | # description provided in `reason_details`. Examples are "en", "en-US" or |
| 181 | # "ja-Latn". For more information, see |
| 182 | # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. |
| 183 | "reasonDetails": "A String", # Required. A free-form description detailing why the playable location is |
| 184 | # considered bad. |
| 185 | }, |
| 186 | ], |
| 187 | "requestId": "A String", # 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 | "clientInfo": { # Client information. # Required. Information about the client device (for example, device model and |
| 195 | # operating system). |
| 196 | "languageCode": "A String", # Language code (in BCP-47 format) indicating the UI language of the client. |
| 197 | # Examples are "en", "en-US" or "ja-Latn". For more information, see |
| 198 | # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. |
| 199 | "operatingSystemBuild": "A String", # Build number/version of the operating system. e.g., the contents of |
| 200 | # android.os.Build.ID in Android, or the contents of sysctl "kern.osversion" |
| 201 | # in iOS. |
| 202 | "platform": "A String", # Platform where the application is running. |
| 203 | "apiClient": "A String", # API client name and version. For example, the SDK calling the API. The |
| 204 | # exact format is up to the client. |
| 205 | "applicationId": "A String", # Application ID, such as the package name on Android and the bundle |
| 206 | # identifier on iOS platforms. |
| 207 | "applicationVersion": "A String", # Application version number, such as "1.2.3". The exact format is |
| 208 | # application-dependent. |
| 209 | "deviceModel": "A String", # Device model as reported by the device. The exact format is |
| 210 | # platform-dependent. |
| 211 | "operatingSystem": "A String", # Operating system name and version as reported by the OS. For example, |
| 212 | # "Mac OS X 10.10.4". 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 | |
| 221 | Returns: |
| 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, |
| 234 | that satisfy optional filter criteria. |
| 235 | |
| 236 | Note: Identical `SamplePlayableLocations` requests can return different |
| 237 | results as the state of the world changes over time. |
| 238 | |
| 239 | Args: |
| 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 | # "criteria" 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 | "areaFilter": { # Specifies the area to search for playable locations. # Required. Specifies the area to search within for playable locations. |
| 268 | "s2CellId": "A String", # 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 | "criteria": [ # 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 | "filter": { # 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 | "maxLocationCount": 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 | "includedTypes": [ # Restricts the set of playable locations to just the |
| 292 | # [types](/maps/documentation/gaming/tt/types) that you want. |
| 293 | "A String", |
| 294 | ], |
| 295 | "spacing": { # 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 | "minSpacingMeters": 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->To. |
| 334 | # * X->X: 400m |
| 335 | # * Y->X, Y->Y: unspecified. |
| 336 | # * Z->X, Z->Y, Z->Z: 200m. |
| 337 | "pointType": "A String", # 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 | "fieldsToReturn": "A String", # 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 | "gameObjectType": 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<game_object_type, Response>. |
| 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 | |
| 377 | Returns: |
| 378 | An object of the form: |
| 379 | |
| 380 | { # |
| 381 | # Response for the |
| 382 | # SamplePlayableLocations |
| 383 | # method. |
| 384 | "ttl": "A String", # Required. Specifies the "time-to-live" 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 | "locationsPerGameObjectType": { # Each PlayableLocation object corresponds to a game_object_type specified |
| 392 | # in the request. |
| 393 | "a_key": { # A list of PlayableLocation objects that satisfies a single Criterion. |
| 394 | "locations": [ # 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 | "plusCode": "A String", # A [plus code] (http://openlocationcode.com) |
| 398 | "centerPoint": { # 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 | # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 |
| 407 | # standard</a>. Values must be within normalized ranges. |
| 408 | "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. |
| 409 | "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. |
| 410 | }, |
| 411 | "name": "A String", # Required. The name of this playable location. |
| 412 | "placeId": "A String", # A [place ID] (https://developers.google.com/places/place-id) |
| 413 | "snappedPoint": { # An object representing a latitude/longitude pair. This is expressed as a pair # The playable location'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 | # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 |
| 418 | # standard</a>. Values must be within normalized ranges. |
| 419 | "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. |
| 420 | "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. |
| 421 | }, |
| 422 | "types": [ # 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 | "A String", |
| 428 | ], |
| 429 | }, |
| 430 | ], |
| 431 | }, |
| 432 | }, |
| 433 | }</pre> |
| 434 | </div> |
| 435 | |
| 436 | </body></html> |