Method: events.listDefinitions
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Muestra una lista de las definiciones de eventos de esta aplicación.
Solicitud HTTP
GET https://games.googleapis.com/games/v1/eventDefinitions
Parámetros de consulta
Parámetros |
language |
string
Es el idioma preferido para usar en las cadenas que muestra este método.
|
maxResults |
integer
Es la cantidad máxima de definiciones de eventos que se mostrarán en la respuesta, que se usa para la paginación. Para cualquier respuesta, la cantidad real de definiciones de eventos que se mostrarán puede ser menor que el maxResults especificado.
|
pageToken |
string
Es el token que muestra la solicitud anterior.
|
Cuerpo de la solicitud
El cuerpo de la solicitud debe estar vacío.
Cuerpo de la respuesta
Una respuesta de ListDefinitions.
Si se ejecuta correctamente, el cuerpo de la respuesta contendrá datos con la siguiente estructura:
Representación JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (EventDefinition )
}
]
} |
Campos |
kind |
string
Identifica de forma única el tipo de este recurso. El valor siempre es la cadena fija games#eventDefinitionListResponse .
|
nextPageToken |
string
Es el token de paginación para la siguiente página de resultados.
|
items[] |
object (EventDefinition )
Las definiciones de eventos
|
Permisos de autorización
Se requiere uno de los siguientes permisos de OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Para obtener más información, consulta la descripción general de OAuth 2.0.
EventDefinition
Un recurso de definición de eventos.
Representación JSON |
{
"id": string,
"visibility": enum (EventVisibility ),
"displayName": string,
"imageUrl": string,
"childEvents": [
{
object (EventChild )
}
],
"description": string,
"isDefaultImageUrl": boolean,
"kind": string
} |
Campos |
id |
string
El ID del evento.
|
visibility |
enum (EventVisibility )
Es la visibilidad del evento al que se le hace un seguimiento en esta definición.
|
displayName |
string
Es el nombre que se mostrará para el evento.
|
imageUrl |
string
Es la URL base de la imagen que representa el evento.
|
childEvents[] |
object (EventChild )
Es una lista de eventos que son secundarios de este evento.
|
description |
string
Descripción de lo que representa este evento.
|
isDefaultImageUrl |
boolean
Indica si la imagen del ícono que se muestra es una imagen predeterminada o proporcionada por el juego.
|
kind |
string
Identifica de forma única el tipo de este recurso. El valor siempre es la cadena fija games#eventDefinition .
|
EventVisibility
Valores posibles para la visibilidad de un evento.
Enums |
REVEALED |
Este evento debería ser visible para todos los usuarios. |
HIDDEN |
Este evento solo debe mostrarse a los usuarios que lo hayan registrado al menos una vez. |
EventChild
Un recurso de relación secundario de un evento.
Representación JSON |
{
"childId": string,
"kind": string
} |
Campos |
childId |
string
Es el ID del evento secundario.
|
kind |
string
Identifica de forma única el tipo de este recurso. El valor siempre es la cadena fija games#eventChild .
|
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 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`. |"]]