Home | History | Annotate | Download | only in dyn
      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="games_v1.html">Google Play Game Services API</a> . <a href="games_v1.events.html">events</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#listByPlayer">listByPlayer(pageToken=None, language=None, maxResults=None, consistencyToken=None)</a></code></p>
     79 <p class="firstline">Returns a list showing the current progress on events in this application for the currently authenticated user.</p>
     80 <p class="toc_element">
     81   <code><a href="#listByPlayer_next">listByPlayer_next(previous_request, previous_response)</a></code></p>
     82 <p class="firstline">Retrieves the next page of results.</p>
     83 <p class="toc_element">
     84   <code><a href="#listDefinitions">listDefinitions(pageToken=None, language=None, maxResults=None, consistencyToken=None)</a></code></p>
     85 <p class="firstline">Returns a list of the event definitions in this application.</p>
     86 <p class="toc_element">
     87   <code><a href="#listDefinitions_next">listDefinitions_next(previous_request, previous_response)</a></code></p>
     88 <p class="firstline">Retrieves the next page of results.</p>
     89 <p class="toc_element">
     90   <code><a href="#record">record(body, language=None, consistencyToken=None)</a></code></p>
     91 <p class="firstline">Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.</p>
     92 <h3>Method Details</h3>
     93 <div class="method">
     94     <code class="details" id="listByPlayer">listByPlayer(pageToken=None, language=None, maxResults=None, consistencyToken=None)</code>
     95   <pre>Returns a list showing the current progress on events in this application for the currently authenticated user.
     96 
     97 Args:
     98   pageToken: string, The token returned by the previous request.
     99   language: string, The preferred language to use for strings returned by this method.
    100   maxResults: integer, The maximum number of events to return in the response, used for paging. For any response, the actual number of events to return may be less than the specified maxResults.
    101   consistencyToken: string, The last-seen mutation timestamp.
    102 
    103 Returns:
    104   An object of the form:
    105 
    106     { # This is a JSON template for a ListByPlayer response.
    107     "nextPageToken": "A String", # The pagination token for the next page of results.
    108     "items": [ # The player events.
    109       { # This is a JSON template for an event status resource.
    110         "definitionId": "A String", # The ID of the event definition.
    111         "playerId": "A String", # The ID of the player.
    112         "kind": "games#playerEvent", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerEvent.
    113         "numEvents": "A String", # The current number of times this event has occurred.
    114         "formattedNumEvents": "A String", # The current number of times this event has occurred, as a string. The formatting of this string depends on the configuration of your event in the Play Games Developer Console.
    115       },
    116     ],
    117     "kind": "games#playerEventListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerEventListResponse.
    118   }</pre>
    119 </div>
    120 
    121 <div class="method">
    122     <code class="details" id="listByPlayer_next">listByPlayer_next(previous_request, previous_response)</code>
    123   <pre>Retrieves the next page of results.
    124 
    125 Args:
    126   previous_request: The request for the previous page. (required)
    127   previous_response: The response from the request for the previous page. (required)
    128 
    129 Returns:
    130   A request object that you can call 'execute()' on to request the next
    131   page. Returns None if there are no more items in the collection.
    132     </pre>
    133 </div>
    134 
    135 <div class="method">
    136     <code class="details" id="listDefinitions">listDefinitions(pageToken=None, language=None, maxResults=None, consistencyToken=None)</code>
    137   <pre>Returns a list of the event definitions in this application.
    138 
    139 Args:
    140   pageToken: string, The token returned by the previous request.
    141   language: string, The preferred language to use for strings returned by this method.
    142   maxResults: integer, The maximum number of event definitions to return in the response, used for paging. For any response, the actual number of event definitions to return may be less than the specified maxResults.
    143   consistencyToken: string, The last-seen mutation timestamp.
    144 
    145 Returns:
    146   An object of the form:
    147 
    148     { # This is a JSON template for a ListDefinitions response.
    149     "nextPageToken": "A String", # The pagination token for the next page of results.
    150     "items": [ # The event definitions.
    151       { # This is a JSON template for an event definition resource.
    152         "isDefaultImageUrl": True or False, # Indicates whether the icon image being returned is a default image, or is game-provided.
    153         "kind": "games#eventDefinition", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventDefinition.
    154         "displayName": "A String", # The name to display for the event.
    155         "description": "A String", # Description of what this event represents.
    156         "imageUrl": "A String", # The base URL for the image that represents the event.
    157         "visibility": "A String", # The visibility of event being tracked in this definition.
    158             # Possible values are:
    159             # - "REVEALED": This event should be visible to all users.
    160             # - "HIDDEN": This event should only be shown to users that have recorded this event at least once.
    161         "childEvents": [ # A list of events that are a child of this event.
    162           { # This is a JSON template for an event child relationship resource.
    163             "kind": "games#eventChild", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventChild.
    164             "childId": "A String", # The ID of the child event.
    165           },
    166         ],
    167         "id": "A String", # The ID of the event.
    168       },
    169     ],
    170     "kind": "games#eventDefinitionListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventDefinitionListResponse.
    171   }</pre>
    172 </div>
    173 
    174 <div class="method">
    175     <code class="details" id="listDefinitions_next">listDefinitions_next(previous_request, previous_response)</code>
    176   <pre>Retrieves the next page of results.
    177 
    178 Args:
    179   previous_request: The request for the previous page. (required)
    180   previous_response: The response from the request for the previous page. (required)
    181 
    182 Returns:
    183   A request object that you can call 'execute()' on to request the next
    184   page. Returns None if there are no more items in the collection.
    185     </pre>
    186 </div>
    187 
    188 <div class="method">
    189     <code class="details" id="record">record(body, language=None, consistencyToken=None)</code>
    190   <pre>Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.
    191 
    192 Args:
    193   body: object, The request body. (required)
    194     The object takes the form of:
    195 
    196 { # This is a JSON template for an event period update resource.
    197     "timePeriods": [ # A list of the time period updates being made in this request.
    198       { # This is a JSON template for an event period update resource.
    199         "kind": "games#eventPeriodUpdate", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventPeriodUpdate.
    200         "timePeriod": { # This is a JSON template for an event period time range. # The time period being covered by this update.
    201           "kind": "games#eventPeriodRange", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventPeriodRange.
    202           "periodStartMillis": "A String", # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch).
    203           "periodEndMillis": "A String", # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
    204         },
    205         "updates": [ # The updates being made for this time period.
    206           { # This is a JSON template for an event period update resource.
    207             "definitionId": "A String", # The ID of the event being modified in this update.
    208             "kind": "games#eventUpdateRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventUpdateRequest.
    209             "updateCount": "A String", # The number of times this event occurred in this time period.
    210           },
    211         ],
    212       },
    213     ],
    214     "kind": "games#eventRecordRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventRecordRequest.
    215     "requestId": "A String", # The request ID used to identify this attempt to record events.
    216     "currentTimeMillis": "A String", # The current time when this update was sent, in milliseconds, since 1970 UTC (Unix Epoch).
    217   }
    218 
    219   language: string, The preferred language to use for strings returned by this method.
    220   consistencyToken: string, The last-seen mutation timestamp.
    221 
    222 Returns:
    223   An object of the form:
    224 
    225     { # This is a JSON template for an event period update resource.
    226     "playerEvents": [ # The current status of any updated events
    227       { # This is a JSON template for an event status resource.
    228         "definitionId": "A String", # The ID of the event definition.
    229         "playerId": "A String", # The ID of the player.
    230         "kind": "games#playerEvent", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerEvent.
    231         "numEvents": "A String", # The current number of times this event has occurred.
    232         "formattedNumEvents": "A String", # The current number of times this event has occurred, as a string. The formatting of this string depends on the configuration of your event in the Play Games Developer Console.
    233       },
    234     ],
    235     "eventFailures": [ # Any failures updating a particular event.
    236       { # This is a JSON template for an event update failure resource.
    237         "eventId": "A String", # The ID of the event that was not updated.
    238         "kind": "games#eventRecordFailure", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventRecordFailure.
    239         "failureCause": "A String", # The cause for the update failure.
    240             # Possible values are:
    241             # - "NOT_FOUND" - An attempt was made to set an event that was not defined.
    242             # - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event by a non-positive value.
    243       },
    244     ],
    245     "kind": "games#eventUpdateResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventUpdateResponse.
    246     "batchFailures": [ # Any batch-wide failures which occurred applying updates.
    247       { # This is a JSON template for a batch update failure resource.
    248         "kind": "games#eventBatchRecordFailure", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventBatchRecordFailure.
    249         "range": { # This is a JSON template for an event period time range. # The time range which was rejected; empty for a request-wide failure.
    250           "kind": "games#eventPeriodRange", # Uniquely identifies the type of this resource. Value is always the fixed string games#eventPeriodRange.
    251           "periodStartMillis": "A String", # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch).
    252           "periodEndMillis": "A String", # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
    253         },
    254         "failureCause": "A String", # The cause for the update failure.
    255             # Possible values are:
    256             # - "TOO_LARGE": A batch request was issued with more events than are allowed in a single batch.
    257             # - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the past to record.
    258             # - "TIME_PERIOD_SHORT": A batch was sent with a time range that was too short.
    259             # - "TIME_PERIOD_LONG": A batch was sent with a time range that was too long.
    260             # - "ALREADY_UPDATED": An attempt was made to record a batch of data which was already seen.
    261             # - "RECORD_RATE_HIGH": An attempt was made to record data faster than the server will apply updates.
    262       },
    263     ],
    264   }</pre>
    265 </div>
    266 
    267 </body></html>