blob: ce8f65ff857954a57dbadfc95cef1a619189d3a7 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="playablelocations_v3.html">Playable Locations API</a> . <a href="playablelocations_v3.v3.html">v3</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#logImpressions">logImpressions(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Logs new events when playable locations are displayed, and when they are</p>
<p class="toc_element">
<code><a href="#logPlayerReports">logPlayerReports(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Logs bad playable location reports submitted by players.</p>
<p class="toc_element">
<code><a href="#samplePlayableLocations">samplePlayableLocations(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns a set of playable locations that lie within a specified area,</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="logImpressions">logImpressions(body=None, x__xgafv=None)</code>
<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.
Args:
body: object, The request body.
The object takes the form of:
{ # A request for logging impressions.
&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.
&quot;clientInfo&quot;: { # Client information. # Required. Information about the client device. For example, device model and
# operating system.
&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.
&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.
&quot;platform&quot;: &quot;A String&quot;, # Platform where the application is running.
&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.
&quot;applicationId&quot;: &quot;A String&quot;, # Application ID, such as the package name on Android and the bundle
# identifier on iOS platforms.
&quot;applicationVersion&quot;: &quot;A String&quot;, # Application version number, such as &quot;1.2.3&quot;. The exact format is
# application-dependent.
&quot;deviceModel&quot;: &quot;A String&quot;, # Device model as reported by the device. The exact format is
# platform-dependent.
&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.
},
&quot;impressions&quot;: [ # Required. Impression event details. The maximum number of impression reports that you
# can log at once is 50.
{ # Encapsulates impression event details.
&quot;impressionType&quot;: &quot;A String&quot;, # Required. The type of impression event.
&quot;locationName&quot;: &quot;A String&quot;, # Required. The name of the playable location.
&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.
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A response for the LogImpressions method.
# This method returns no data upon success.
}</pre>
</div>
<div class="method">
<code class="details" id="logPlayerReports">logPlayerReports(body=None, x__xgafv=None)</code>
<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.
Args:
body: object, The request body.
The object takes the form of:
{ # A request for logging your player&#x27;s bad location reports.
&quot;playerReports&quot;: [ # Required. Player reports. The maximum number of player reports that you can log at
# once is 50.
{ # A report submitted by a player about a playable location that is considered
# inappropriate for use in the game.
&quot;reasons&quot;: [ # Required. One or more reasons why this playable location is considered bad.
&quot;A String&quot;,
],
&quot;locationName&quot;: &quot;A String&quot;, # Required. The name of the playable location.
&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.
&quot;reasonDetails&quot;: &quot;A String&quot;, # Required. A free-form description detailing why the playable location is
# considered bad.
},
],
&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.
&quot;clientInfo&quot;: { # Client information. # Required. Information about the client device (for example, device model and
# operating system).
&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.
&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.
&quot;platform&quot;: &quot;A String&quot;, # Platform where the application is running.
&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.
&quot;applicationId&quot;: &quot;A String&quot;, # Application ID, such as the package name on Android and the bundle
# identifier on iOS platforms.
&quot;applicationVersion&quot;: &quot;A String&quot;, # Application version number, such as &quot;1.2.3&quot;. The exact format is
# application-dependent.
&quot;deviceModel&quot;: &quot;A String&quot;, # Device model as reported by the device. The exact format is
# platform-dependent.
&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.
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A response for the LogPlayerReports
# method.
#
# This method returns no data upon success.
}</pre>
</div>
<div class="method">
<code class="details" id="samplePlayableLocations">samplePlayableLocations(body=None, x__xgafv=None)</code>
<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.
Args:
body: object, The request body.
The object takes the form of:
{ #
# 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.
&quot;areaFilter&quot;: { # Specifies the area to search for playable locations. # Required. Specifies the area to search within for playable locations.
&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)
},
&quot;criteria&quot;: [ # Required. Specifies one or more (up to 5) criteria for filtering the
# returned playable locations.
{ # Encapsulates a filter criterion for searching for a set of playable
# locations.
&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.
&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.
&quot;includedTypes&quot;: [ # Restricts the set of playable locations to just the
# [types](/maps/documentation/gaming/tt/types) that you want.
&quot;A String&quot;,
],
&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.
&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.
&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.
},
},
&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.
&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&lt;game_object_type, Response&gt;.
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ #
# Response for the
# SamplePlayableLocations
# method.
&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).
&quot;locationsPerGameObjectType&quot;: { # Each PlayableLocation object corresponds to a game_object_type specified
# in the request.
&quot;a_key&quot;: { # A list of PlayableLocation objects that satisfies a single Criterion.
&quot;locations&quot;: [ # A list of playable locations for this game object type.
{ # A geographical point suitable for placing game objects in location-based
# games.
&quot;plusCode&quot;: &quot;A String&quot;, # A [plus code] (http://openlocationcode.com)
&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
# location.
#
# By default, the set of playable locations returned from
# SamplePlayableLocations use
# center-point coordinates.
# of doubles representing degrees latitude and degrees longitude. Unless
# specified otherwise, this must conform to the
# &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
# standard&lt;/a&gt;. Values must be within normalized ranges.
&quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
&quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
},
&quot;name&quot;: &quot;A String&quot;, # Required. The name of this playable location.
&quot;placeId&quot;: &quot;A String&quot;, # A [place ID] (https://developers.google.com/places/place-id)
&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
# nearest road, if a nearby road exists.
# of doubles representing degrees latitude and degrees longitude. Unless
# specified otherwise, this must conform to the
# &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
# standard&lt;/a&gt;. Values must be within normalized ranges.
&quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
&quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
},
&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.
&quot;A String&quot;,
],
},
],
},
},
}</pre>
</div>
</body></html>