Method: events.listDefinitions
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca listę definicji zdarzeń w tej aplikacji.
Żądanie HTTP
GET https://games.googleapis.com/games/v1/eventDefinitions
Parametry zapytania
Parametry |
language |
string
Preferowany język używany w przypadku ciągów znaków zwracanych przez tę metodę.
|
maxResults |
integer
Maksymalna liczba definicji zdarzeń zwracanych w odpowiedzi, używanych na potrzeby stronicowania. W przypadku każdej odpowiedzi rzeczywista liczba definicji zdarzeń do zwrócenia może być mniejsza od określonej wartości maxResults .
|
pageToken |
string
Token zwrócony przez poprzednie żądanie.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
Odpowiedź ListDefinitions.
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (EventDefinition )
}
]
} |
Pola |
kind |
string
Jednoznacznie identyfikuje typ tego zasobu. Wartością jest zawsze stały ciąg znaków games#eventDefinitionListResponse .
|
nextPageToken |
string
Token podziału na strony dla następnej strony wyników.
|
items[] |
object (EventDefinition )
Definicje zdarzeń.
|
Zakresy autoryzacji
Wymaga jednego z tych zakresów protokołu OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Więcej informacji znajdziesz w artykule Omówienie protokołu OAuth 2.0.
EventDefinition
Zasób definicji zdarzenia.
Zapis JSON |
{
"id": string,
"visibility": enum (EventVisibility ),
"displayName": string,
"imageUrl": string,
"childEvents": [
{
object (EventChild )
}
],
"description": string,
"isDefaultImageUrl": boolean,
"kind": string
} |
Pola |
id |
string
Identyfikator zdarzenia.
|
visibility |
enum (EventVisibility )
Widoczność zdarzenia śledzonego w tej definicji.
|
displayName |
string
Wyświetlana nazwa zdarzenia.
|
imageUrl |
string
Podstawowy adres URL obrazu reprezentującego zdarzenie.
|
childEvents[] |
object (EventChild )
Lista zdarzeń podrzędnych wobec tego zdarzenia.
|
description |
string
Opis reprezentowanego zdarzenia.
|
isDefaultImageUrl |
boolean
Wskazuje, czy zwracany obraz ikony jest obrazem domyślnym czy pochodzi z gry.
|
kind |
string
Jednoznacznie identyfikuje typ tego zasobu. Wartością jest zawsze stały ciąg znaków games#eventDefinition .
|
EventVisibility
Możliwe wartości widoczności zdarzenia.
Wartości w polu enum |
REVEALED |
To wydarzenie powinno być widoczne dla wszystkich użytkowników. |
HIDDEN |
To zdarzenie powinno być widoczne tylko dla użytkowników, którzy zarejestrowali je co najmniej raz. |
EventChild
Zasób relacji podrzędnej ze zdarzeniem.
Zapis JSON |
{
"childId": string,
"kind": string
} |
Pola |
childId |
string
Identyfikator zdarzenia podrzędnego.
|
kind |
string
Jednoznacznie identyfikuje typ tego zasobu. Wartością jest zawsze stały ciąg znaków games#eventChild .
|
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[null,null,["Ostatnia aktualizacja: 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`. |"]]