Google Play Game Services . events

Instance Methods

close()

Close httplib2 connections.

listByPlayer(language=None, maxResults=None, pageToken=None, x__xgafv=None)

Returns a list showing the current progress on events in this application for the currently authenticated user.

listByPlayer_next()

Retrieves the next page of results.

listDefinitions(language=None, maxResults=None, pageToken=None, x__xgafv=None)

Returns a list of the event definitions in this application.

listDefinitions_next()

Retrieves the next page of results.

record(body=None, language=None, x__xgafv=None)

Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.

Method Details

close()
Close httplib2 connections.
listByPlayer(language=None, maxResults=None, pageToken=None, x__xgafv=None)
Returns a list showing the current progress on events in this application for the currently authenticated user.

Args:
  language: string, The preferred language to use for strings returned by this method.
  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.
  pageToken: string, The token returned by the previous request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A ListByPlayer response.
  "items": [ # The player events.
    { # An event status resource.
      "definitionId": "A String", # The ID of the event definition.
      "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.
      "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#playerEvent`.
      "numEvents": "A String", # The current number of times this event has occurred.
      "playerId": "A String", # The ID of the player.
    },
  ],
  "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#playerEventListResponse`.
  "nextPageToken": "A String", # The pagination token for the next page of results.
}
listByPlayer_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
listDefinitions(language=None, maxResults=None, pageToken=None, x__xgafv=None)
Returns a list of the event definitions in this application.

Args:
  language: string, The preferred language to use for strings returned by this method.
  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`.
  pageToken: string, The token returned by the previous request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A ListDefinitions response.
  "items": [ # The event definitions.
    { # An event definition resource.
      "childEvents": [ # A list of events that are a child of this event.
        { # An event child relationship resource.
          "childId": "A String", # The ID of the child event.
          "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventChild`.
        },
      ],
      "description": "A String", # Description of what this event represents.
      "displayName": "A String", # The name to display for the event.
      "id": "A String", # The ID of the event.
      "imageUrl": "A String", # The base URL for the image that represents the event.
      "isDefaultImageUrl": True or False, # Indicates whether the icon image being returned is a default image, or is game-provided.
      "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventDefinition`.
      "visibility": "A String", # The visibility of event being tracked in this definition.
    },
  ],
  "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventDefinitionListResponse`.
  "nextPageToken": "A String", # The pagination token for the next page of results.
}
listDefinitions_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
record(body=None, language=None, x__xgafv=None)
Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.

Args:
  body: object, The request body.
    The object takes the form of:

{ # An event period update resource.
  "currentTimeMillis": "A String", # The current time when this update was sent, in milliseconds, since 1970 UTC (Unix Epoch).
  "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventRecordRequest`.
  "requestId": "A String", # The request ID used to identify this attempt to record events.
  "timePeriods": [ # A list of the time period updates being made in this request.
    { # An event period update resource.
      "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventPeriodUpdate`.
      "timePeriod": { # An event period time range. # The time period being covered by this update.
        "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventPeriodRange`.
        "periodEndMillis": "A String", # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
        "periodStartMillis": "A String", # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch).
      },
      "updates": [ # The updates being made for this time period.
        { # An event period update resource.
          "definitionId": "A String", # The ID of the event being modified in this update.
          "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventUpdateRequest`.
          "updateCount": "A String", # The number of times this event occurred in this time period.
        },
      ],
    },
  ],
}

  language: string, The preferred language to use for strings returned by this method.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An event period update resource.
  "batchFailures": [ # Any batch-wide failures which occurred applying updates.
    { # A batch update failure resource.
      "failureCause": "A String", # The cause for the update failure.
      "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventBatchRecordFailure`.
      "range": { # An event period time range. # The time range which was rejected; empty for a request-wide failure.
        "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventPeriodRange`.
        "periodEndMillis": "A String", # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
        "periodStartMillis": "A String", # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch).
      },
    },
  ],
  "eventFailures": [ # Any failures updating a particular event.
    { # An event update failure resource.
      "eventId": "A String", # The ID of the event that was not updated.
      "failureCause": "A String", # The cause for the update failure.
      "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventRecordFailure`.
    },
  ],
  "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#eventUpdateResponse`.
  "playerEvents": [ # The current status of any updated events
    { # An event status resource.
      "definitionId": "A String", # The ID of the event definition.
      "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.
      "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed string `games#playerEvent`.
      "numEvents": "A String", # The current number of times this event has occurred.
      "playerId": "A String", # The ID of the player.
    },
  ],
}