blob: df5f58e1b72ff18b5df42199bd8642b65e300c55 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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="games_v1.html">Google Play Game Services API</a> . <a href="games_v1.players.html">players</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#get">get(playerId, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#list">list(collection, language=None, maxResults=None, pageToken=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040082<p class="firstline">Get the collection of players for the currently authenticated user.</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088 <code class="details" id="get">get(playerId, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -040089 <pre>Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me.
90
91Args:
Bu Sun Kim65020912020-05-20 12:08:20 -070092 playerId: string, A player ID. A value of me may be used in place of the authenticated player&#x27;s ID. (required)
John Asmuth614db982014-04-24 15:46:26 -040093 language: string, The preferred language to use for strings returned by this method.
94
95Returns:
96 An object of the form:
97
98 { # This is a JSON template for a Player resource.
Bu Sun Kim65020912020-05-20 12:08:20 -070099 &quot;avatarImageUrl&quot;: &quot;A String&quot;, # The base URL for the image that represents the player.
100 &quot;bannerUrlLandscape&quot;: &quot;A String&quot;, # The url to the landscape mode player banner image.
101 &quot;bannerUrlPortrait&quot;: &quot;A String&quot;, # The url to the portrait mode player banner image.
102 &quot;displayName&quot;: &quot;A String&quot;, # The name to display for the player.
103 &quot;experienceInfo&quot;: { # This is a JSON template for 1P/3P metadata about the player&#x27;s experience. # An object to represent Play Game experience information for the player.
104 &quot;currentExperiencePoints&quot;: &quot;A String&quot;, # The current number of experience points for the player.
105 &quot;currentLevel&quot;: { # This is a JSON template for 1P/3P metadata about a user&#x27;s level. # The current level of the player.
106 &quot;kind&quot;: &quot;games#playerLevel&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
107 &quot;level&quot;: 42, # The level for the user.
108 &quot;maxExperiencePoints&quot;: &quot;A String&quot;, # The maximum experience points for this level.
109 &quot;minExperiencePoints&quot;: &quot;A String&quot;, # The minimum experience points for this level.
Craig Citro065b5302014-08-14 00:47:23 -0700110 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 &quot;kind&quot;: &quot;games#playerExperienceInfo&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
112 &quot;lastLevelUpTimestampMillis&quot;: &quot;A String&quot;, # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
113 &quot;nextLevel&quot;: { # This is a JSON template for 1P/3P metadata about a user&#x27;s level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
114 &quot;kind&quot;: &quot;games#playerLevel&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
115 &quot;level&quot;: 42, # The level for the user.
116 &quot;maxExperiencePoints&quot;: &quot;A String&quot;, # The maximum experience points for this level.
117 &quot;minExperiencePoints&quot;: &quot;A String&quot;, # The minimum experience points for this level.
Craig Citro065b5302014-08-14 00:47:23 -0700118 },
119 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 &quot;friendStatus&quot;: &quot;A String&quot;, # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
121 &quot;kind&quot;: &quot;games#player&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
122 &quot;lastPlayedWith&quot;: { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
123 &quot;autoMatched&quot;: True or False, # True if the player was auto-matched with the currently authenticated user.
124 &quot;kind&quot;: &quot;games#played&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
125 &quot;timeMillis&quot;: &quot;A String&quot;, # The last time the player played the game in milliseconds since the epoch in UTC.
126 },
127 &quot;name&quot;: { # An object representation of the individual components of the player&#x27;s name. For some players, these fields may not be present.
128 &quot;familyName&quot;: &quot;A String&quot;, # The family name of this player. In some places, this is known as the last name.
129 &quot;givenName&quot;: &quot;A String&quot;, # The given name of this player. In some places, this is known as the first name.
130 },
131 &quot;originalPlayerId&quot;: &quot;A String&quot;, # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
132 &quot;playerId&quot;: &quot;A String&quot;, # The ID of the player.
133 &quot;profileSettings&quot;: { # This is a JSON template for profile settings # The player&#x27;s profile settings. Controls whether or not the player&#x27;s profile is visible to other players.
134 &quot;friendsListVisibility&quot;: &quot;A String&quot;, # Whether the player&#x27;s friends list is visible to the game.
135 &quot;kind&quot;: &quot;games#profileSettings&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
136 &quot;profileVisible&quot;: True or False,
137 },
138 &quot;title&quot;: &quot;A String&quot;, # The player&#x27;s title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400139 }</pre>
140</div>
141
142<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 <code class="details" id="list">list(collection, language=None, maxResults=None, pageToken=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400144 <pre>Get the collection of players for the currently authenticated user.
145
146Args:
147 collection: string, Collection of players being retrieved (required)
148 Allowed values
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 connected - (DEPRECATED) Retrieve a list of players that are also playing this game in reverse chronological order.
150 friends_all - Retrieve a list of players who are friends of the user in alphabetical order.
151 playedWith - (DEPRECATED) Retrieve a list of players you have played a multiplayer game (realtime or turn-based) with recently.
152 played_with - (DEPRECATED) Retrieve a list of players you have played a multiplayer game (realtime or turn-based) with recently.
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 visible - (DEPRECATED: please use FRIENDS_ALL) Retrieve a list of players in the user&#x27;s social graph that are visible to this game.
John Asmuth614db982014-04-24 15:46:26 -0400154 language: string, The preferred language to use for strings returned by this method.
155 maxResults: integer, The maximum number of player resources to return in the response, used for paging. For any response, the actual number of player resources returned may be less than the specified maxResults.
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 pageToken: string, The token returned by the previous request.
John Asmuth614db982014-04-24 15:46:26 -0400157
158Returns:
159 An object of the form:
160
161 { # This is a JSON template for a third party player list response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;items&quot;: [ # The players.
John Asmuth614db982014-04-24 15:46:26 -0400163 { # This is a JSON template for a Player resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;avatarImageUrl&quot;: &quot;A String&quot;, # The base URL for the image that represents the player.
165 &quot;bannerUrlLandscape&quot;: &quot;A String&quot;, # The url to the landscape mode player banner image.
166 &quot;bannerUrlPortrait&quot;: &quot;A String&quot;, # The url to the portrait mode player banner image.
167 &quot;displayName&quot;: &quot;A String&quot;, # The name to display for the player.
168 &quot;experienceInfo&quot;: { # This is a JSON template for 1P/3P metadata about the player&#x27;s experience. # An object to represent Play Game experience information for the player.
169 &quot;currentExperiencePoints&quot;: &quot;A String&quot;, # The current number of experience points for the player.
170 &quot;currentLevel&quot;: { # This is a JSON template for 1P/3P metadata about a user&#x27;s level. # The current level of the player.
171 &quot;kind&quot;: &quot;games#playerLevel&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
172 &quot;level&quot;: 42, # The level for the user.
173 &quot;maxExperiencePoints&quot;: &quot;A String&quot;, # The maximum experience points for this level.
174 &quot;minExperiencePoints&quot;: &quot;A String&quot;, # The minimum experience points for this level.
Craig Citro065b5302014-08-14 00:47:23 -0700175 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 &quot;kind&quot;: &quot;games#playerExperienceInfo&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
177 &quot;lastLevelUpTimestampMillis&quot;: &quot;A String&quot;, # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
178 &quot;nextLevel&quot;: { # This is a JSON template for 1P/3P metadata about a user&#x27;s level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
179 &quot;kind&quot;: &quot;games#playerLevel&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
180 &quot;level&quot;: 42, # The level for the user.
181 &quot;maxExperiencePoints&quot;: &quot;A String&quot;, # The maximum experience points for this level.
182 &quot;minExperiencePoints&quot;: &quot;A String&quot;, # The minimum experience points for this level.
Craig Citro065b5302014-08-14 00:47:23 -0700183 },
184 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700185 &quot;friendStatus&quot;: &quot;A String&quot;, # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
186 &quot;kind&quot;: &quot;games#player&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
187 &quot;lastPlayedWith&quot;: { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
188 &quot;autoMatched&quot;: True or False, # True if the player was auto-matched with the currently authenticated user.
189 &quot;kind&quot;: &quot;games#played&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
190 &quot;timeMillis&quot;: &quot;A String&quot;, # The last time the player played the game in milliseconds since the epoch in UTC.
191 },
192 &quot;name&quot;: { # An object representation of the individual components of the player&#x27;s name. For some players, these fields may not be present.
193 &quot;familyName&quot;: &quot;A String&quot;, # The family name of this player. In some places, this is known as the last name.
194 &quot;givenName&quot;: &quot;A String&quot;, # The given name of this player. In some places, this is known as the first name.
195 },
196 &quot;originalPlayerId&quot;: &quot;A String&quot;, # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
197 &quot;playerId&quot;: &quot;A String&quot;, # The ID of the player.
198 &quot;profileSettings&quot;: { # This is a JSON template for profile settings # The player&#x27;s profile settings. Controls whether or not the player&#x27;s profile is visible to other players.
199 &quot;friendsListVisibility&quot;: &quot;A String&quot;, # Whether the player&#x27;s friends list is visible to the game.
200 &quot;kind&quot;: &quot;games#profileSettings&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
201 &quot;profileVisible&quot;: True or False,
202 },
203 &quot;title&quot;: &quot;A String&quot;, # The player&#x27;s title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400204 },
205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;kind&quot;: &quot;games#playerListResponse&quot;, # Uniquely identifies the type of this resource. Value is always the fixed string games#playerListResponse.
207 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token corresponding to the next page of results.
John Asmuth614db982014-04-24 15:46:26 -0400208 }</pre>
209</div>
210
211<div class="method">
212 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
213 <pre>Retrieves the next page of results.
214
215Args:
216 previous_request: The request for the previous page. (required)
217 previous_response: The response from the request for the previous page. (required)
218
219Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400221 page. Returns None if there are no more items in the collection.
222 </pre>
223</div>
224
225</body></html>