Method: events.listDefinitions
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחזירה רשימה של הגדרות האירוע באפליקציה הזו.
בקשת HTTP
GET https://games.googleapis.com/games/v1/eventDefinitions
פרמטרים של שאילתה
פרמטרים |
language |
string
השפה המועדפת לשימוש למחרוזות שמוחזרות בשיטה הזו.
|
maxResults |
integer
המספר המקסימלי של הגדרות אירועים שיחזרו בתשובה. המספר הזה משמש לחלוקה לדפים. בכל תגובה, מספר הגדרות האירועים שיוחזרו בפועל עשוי להיות קטן מ-maxResults שצוין.
|
pageToken |
string
האסימון שהוחזר בעקבות הבקשה הקודמת.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
תגובה של ListSettings.
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
ייצוג JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (EventDefinition )
}
]
} |
שדות |
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#eventDefinitionListResponse .
|
nextPageToken |
string
אסימון החלוקה לדפים של דף התוצאות הבא.
|
items[] |
object (EventDefinition )
הגדרות האירוע.
|
היקפי ההרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
למידע נוסף, קראו את המאמר סקירה כללית של OAuth 2.0.
EventDefinition
ייצוג JSON |
{
"id": string,
"visibility": enum (EventVisibility ),
"displayName": string,
"imageUrl": string,
"childEvents": [
{
object (EventChild )
}
],
"description": string,
"isDefaultImageUrl": boolean,
"kind": string
} |
שדות |
id |
string
מזהה האירוע.
|
visibility |
enum (EventVisibility )
החשיפה של אירוע שנמצא במעקב בהגדרה הזו.
|
displayName |
string
השם שיוצג לאירוע.
|
imageUrl |
string
כתובת ה-URL הבסיסית של התמונה שמייצגת את האירוע.
|
childEvents[] |
object (EventChild )
רשימה של אירועים שהם צאצאים של האירוע הזה.
|
description |
string
תיאור של מה שהאירוע הזה מייצג.
|
isDefaultImageUrl |
boolean
מציין אם תמונת הסמל שהוחזרה היא תמונת ברירת מחדל או שסופקה מתוך המשחק.
|
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#eventDefinition .
|
EventVisibility
ערכים אפשריים לחשיפת אירוע.
טיפוסים בני מנייה (enum) |
REVEALED |
האירוע הזה צריך להיות גלוי לכל המשתמשים. |
HIDDEN |
האירוע צריך להופיע רק למשתמשים שהקליטו את האירוע הזה לפחות פעם אחת. |
EventChild
משאב של קשרי גומלין צאצא של אירוע.
ייצוג JSON |
{
"childId": string,
"kind": string
} |
שדות |
childId |
string
המזהה של אירוע הצאצא.
|
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#eventChild .
|
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 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`. |"]]