Method: events.listDefinitions
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Retorna uma lista das definições de eventos neste app.
Solicitação HTTP
GET https://games.googleapis.com/games/v1/eventDefinitions
Parâmetros de consulta
Parâmetros |
language |
string
O idioma preferencial a ser usado para strings retornadas por esse método.
|
maxResults |
integer
O número máximo de definições de evento a serem retornadas na resposta, usado para paginação. Para qualquer resposta, o número real de definições de evento a serem retornadas pode ser menor que o maxResults especificado.
|
pageToken |
string
O token retornado pela solicitação anterior.
|
Corpo da solicitação
O corpo da solicitação precisa estar vazio.
Corpo da resposta
Uma resposta de ListDefinitions.
Se bem-sucedido, o corpo da resposta incluirá dados com a estrutura a seguir:
Representação JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (EventDefinition )
}
]
} |
Campos |
kind |
string
Identifica exclusivamente o tipo desse recurso. O valor é sempre a string fixa games#eventDefinitionListResponse .
|
nextPageToken |
string
O token de paginação para a próxima página de resultados.
|
items[] |
object (EventDefinition )
As definições de evento.
|
Escopos de autorização
Requer um dos seguintes escopos do OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Para mais informações, consulte a Visão geral do OAuth 2.0.
EventDefinition
Um recurso de definição de evento.
Representação JSON |
{
"id": string,
"visibility": enum (EventVisibility ),
"displayName": string,
"imageUrl": string,
"childEvents": [
{
object (EventChild )
}
],
"description": string,
"isDefaultImageUrl": boolean,
"kind": string
} |
Campos |
id |
string
É o código do evento.
|
visibility |
enum (EventVisibility )
A visibilidade do evento que está sendo rastreado nesta definição.
|
displayName |
string
O nome a ser exibido para o evento.
|
imageUrl |
string
O URL base da imagem que representa o evento.
|
childEvents[] |
object (EventChild )
Uma lista de eventos filhos deste evento.
|
description |
string
Descrição do que o evento representa.
|
isDefaultImageUrl |
boolean
Indica se a imagem do ícone retornada é padrão ou fornecida pelo jogo.
|
kind |
string
Identifica exclusivamente o tipo desse recurso. O valor é sempre a string fixa games#eventDefinition .
|
EventVisibility
Valores possíveis para a visibilidade de um evento.
Enumerações |
REVEALED |
Esse evento precisa estar visível para todos os usuários. |
HIDDEN |
Esse evento só vai ser mostrado aos usuários que o registraram pelo menos uma vez. |
EventChild
Um recurso de relacionamento filho de evento.
Representação JSON |
{
"childId": string,
"kind": string
} |
Campos |
childId |
string
O ID do evento filho.
|
kind |
string
Identifica exclusivamente o tipo desse recurso. O valor é sempre a string fixa games#eventChild .
|
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[null,null,["Última atualização 2025-07-27 UTC."],[],[],null,["# Method: events.listDefinitions\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListEventDefinitionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [EventDefinition](#EventDefinition)\n - [JSON representation](#EventDefinition.SCHEMA_REPRESENTATION)\n- [EventVisibility](#EventVisibility)\n- [EventChild](#EventChild)\n - [JSON representation](#EventChild.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nReturns a list of the event definitions in this application.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/eventDefinitions`\n\n### Query parameters\n\n| Parameters ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `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`. |\n| `pageToken` | `string` The token returned by the previous request. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA ListDefinitions response.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"nextPageToken\": string, \"items\": [ { object (/games/services/web/api/rest/v1/events/listDefinitions#EventDefinition) } ] } ``` |\n\n| Fields ||\n|-----------------|-------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#eventDefinitionListResponse`. |\n| `nextPageToken` | `string` The pagination token for the next page of results. |\n| `items[]` | `object (`[EventDefinition](/games/services/web/api/rest/v1/events/listDefinitions#EventDefinition)`)` The event definitions. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nEventDefinition\n---------------\n\nAn event definition resource.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"visibility\": enum (/games/services/web/api/rest/v1/events/listDefinitions#EventVisibility), \"displayName\": string, \"imageUrl\": string, \"childEvents\": [ { object (/games/services/web/api/rest/v1/events/listDefinitions#EventChild) } ], \"description\": string, \"isDefaultImageUrl\": boolean, \"kind\": string } ``` |\n\n| Fields ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` The ID of the event. |\n| `visibility` | `enum (`[EventVisibility](/games/services/web/api/rest/v1/events/listDefinitions#EventVisibility)`)` The visibility of event being tracked in this definition. |\n| `displayName` | `string` The name to display for the event. |\n| `imageUrl` | `string` The base URL for the image that represents the event. |\n| `childEvents[]` | `object (`[EventChild](/games/services/web/api/rest/v1/events/listDefinitions#EventChild)`)` A list of events that are a child of this event. |\n| `description` | `string` Description of what this event represents. |\n| `isDefaultImageUrl` | `boolean` Indicates whether the icon image being returned is a default image, or is game-provided. |\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#eventDefinition`. |\n\nEventVisibility\n---------------\n\nPossible values for the visibility of an event.\n\n| Enums ||\n|------------|---------------------------------------------------------------------------------------|\n| `REVEALED` | This event should be visible to all users. |\n| `HIDDEN` | This event should only be shown to users that have recorded this event at least once. |\n\nEventChild\n----------\n\nAn event child relationship resource.\n\n| JSON representation |\n|-----------------------------------------------|\n| ``` { \"childId\": string, \"kind\": string } ``` |\n\n| Fields ||\n|-----------|--------------------------------------------------------------------------------------------------------------|\n| `childId` | `string` The ID of the child event. |\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#eventChild`. |"]]