blob: c59545507279389b5fa85ffea09884d90f05300f [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">
78 <code><a href="#get">get(playerId, language=None)</a></code></p>
79<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">
81 <code><a href="#list">list(collection, pageToken=None, language=None, maxResults=None)</a></code></p>
82<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">
88 <code class="details" id="get">get(playerId, language=None)</code>
89 <pre>Retrieves the Player resource with the given ID. To retrieve the player for the currently authenticated user, set playerId to me.
90
91Args:
92 playerId: string, A player ID. A value of me may be used in place of the authenticated player's ID. (required)
93 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.
99 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
100 "displayName": "A String", # The name to display for the player.
101 "name": { # An object representation of the individual components of the player's name.
102 "givenName": "A String", # The given name (first name) of this player.
103 "familyName": "A String", # The family name (last name) of this player.
104 },
105 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
106 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
107 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
108 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
109 },
110 "playerId": "A String", # The ID of the player.
111 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
112 }</pre>
113</div>
114
115<div class="method">
116 <code class="details" id="list">list(collection, pageToken=None, language=None, maxResults=None)</code>
117 <pre>Get the collection of players for the currently authenticated user.
118
119Args:
120 collection: string, Collection of players being retrieved (required)
121 Allowed values
122 playedWith - Retrieve a list of players you have played a multiplayer game (realtime or turn-based) with recently.
123 pageToken: string, The token returned by the previous request.
124 language: string, The preferred language to use for strings returned by this method.
125 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.
126
127Returns:
128 An object of the form:
129
130 { # This is a JSON template for a third party player list response.
131 "nextPageToken": "A String", # Token corresponding to the next page of results.
132 "items": [ # The players.
133 { # This is a JSON template for a Player resource.
134 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
135 "displayName": "A String", # The name to display for the player.
136 "name": { # An object representation of the individual components of the player's name.
137 "givenName": "A String", # The given name (first name) of this player.
138 "familyName": "A String", # The family name (last name) of this player.
139 },
140 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
141 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
142 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
143 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
144 },
145 "playerId": "A String", # The ID of the player.
146 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
147 },
148 ],
149 "kind": "games#playerListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerListResponse.
150 }</pre>
151</div>
152
153<div class="method">
154 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
155 <pre>Retrieves the next page of results.
156
157Args:
158 previous_request: The request for the previous page. (required)
159 previous_response: The response from the request for the previous page. (required)
160
161Returns:
162 A request object that you can call 'execute()' on to request the next
163 page. Returns None if there are no more items in the collection.
164 </pre>
165</div>
166
167</body></html>