Method: achievementDefinitions.list
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
רשימה של כל הגדרות ההישגים של האפליקציה שלכם.
בקשת HTTP
GET https://games.googleapis.com/games/v1/achievements
פרמטרים של שאילתה
פרמטרים |
language |
string
השפה המועדפת לשימוש למחרוזות שמוחזרות בשיטה הזו.
|
maxResults |
integer
המספר המקסימלי של משאבי הישגים שצריך להחזיר בתשובה, המשמש לחלוקה לדפים. בכל תגובה, המספר של משאבי ההישגים שמוחזרים בפועל עשוי להיות קטן מהערך שצוין ב-maxResults .
|
pageToken |
string
האסימון שהוחזר בעקבות הבקשה הקודמת.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
רשימה של אובייקטים בהגדרת הישגים.
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
שדות |
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#achievementDefinitionsListResponse .
|
nextPageToken |
string
אסימון שתואם לדף התוצאות הבא.
|
items[] |
object (AchievementDefinition )
הגדרות ההישגים.
|
היקפי ההרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
למידע נוסף, קראו את המאמר סקירה כללית של OAuth 2.0.
AchievementDefinition
ייצוג JSON |
{
"kind": string,
"id": string,
"name": string,
"description": string,
"achievementType": enum (AchievementType ),
"totalSteps": integer,
"formattedTotalSteps": string,
"revealedIconUrl": string,
"isRevealedIconUrlDefault": boolean,
"unlockedIconUrl": string,
"isUnlockedIconUrlDefault": boolean,
"initialState": enum (InitialAchievementState ),
"experiencePoints": string
} |
שדות |
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#achievementDefinition .
|
id |
string
מזהה ההישג.
|
name |
string
שם ההישג.
|
description |
string
תיאור ההישג.
|
achievementType |
enum (AchievementType )
סוג ההישג.
|
totalSteps |
integer
סך כל השלבים להישג מצטבר.
|
formattedTotalSteps |
string
סך כל השלבים להישג מצטבר כמחרוזת.
|
revealedIconUrl |
string
כתובת ה-URL של התמונה של סמל ההישג שנחשף.
|
isRevealedIconUrlDefault |
boolean
מציין אם תמונת הסמל שנחשפת שהוחזרה היא תמונת ברירת מחדל או מסופקת על ידי המשחק.
|
unlockedIconUrl |
string
כתובת ה-URL של התמונה לסמל של הישג פתוח.
|
isUnlockedIconUrlDefault |
boolean
מציין אם תמונת הסמל לביטול הנעילה שהוחזרה היא תמונת ברירת מחדל או שהיא סופקה על ידי המשחק.
|
initialState |
enum (InitialAchievementState )
המצב הראשוני של ההישג.
|
experiencePoints |
string (int64 format)
נקודות ניסיון מצטבר שיצברו לאחר ביטול הנעילה של ההישג הזה.
|
AchievementType
טיפוסים בני מנייה (enum) |
STANDARD |
ההישג נעול או לא נעול. |
INCREMENTAL |
ההישג הוא מצטבר. |
InitialAchievementState
מצבים ראשוניים אפשריים של הישג.
טיפוסים בני מנייה (enum) |
HIDDEN |
ההישג מוסתר. |
REVEALED |
ההישג ייחשף. |
UNLOCKED |
ההישג בוטלה. |
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Method: achievementDefinitions.list\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.ListAchievementDefinitionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [AchievementDefinition](#AchievementDefinition)\n - [JSON representation](#AchievementDefinition.SCHEMA_REPRESENTATION)\n- [AchievementType](#AchievementType)\n- [InitialAchievementState](#InitialAchievementState)\n- [Try it!](#try-it)\n\nLists all the achievement definitions for your application.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/achievements`\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 achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned 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 list of achievement definition objects.\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/achievementDefinitions/list#AchievementDefinition) } ] } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementDefinitionsListResponse`. |\n| `nextPageToken` | `string` Token corresponding to the next page of results. |\n| `items[]` | `object (`[AchievementDefinition](/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementDefinition)`)` The achievement 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\nAchievementDefinition\n---------------------\n\nAn achievement definition object.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"id\": string, \"name\": string, \"description\": string, \"achievementType\": enum (/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType), \"totalSteps\": integer, \"formattedTotalSteps\": string, \"revealedIconUrl\": string, \"isRevealedIconUrlDefault\": boolean, \"unlockedIconUrl\": string, \"isUnlockedIconUrlDefault\": boolean, \"initialState\": enum (/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState), \"experiencePoints\": string } ``` |\n\n| Fields ||\n|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementDefinition`. |\n| `id` | `string` The ID of the achievement. |\n| `name` | `string` The name of the achievement. |\n| `description` | `string` The description of the achievement. |\n| `achievementType` | `enum (`[AchievementType](/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType)`)` The type of the achievement. |\n| `totalSteps` | `integer` The total steps for an incremental achievement. |\n| `formattedTotalSteps` | `string` The total steps for an incremental achievement as a string. |\n| `revealedIconUrl` | `string` The image URL for the revealed achievement icon. |\n| `isRevealedIconUrlDefault` | `boolean` Indicates whether the revealed icon image being returned is a default image, or is provided by the game. |\n| `unlockedIconUrl` | `string` The image URL for the unlocked achievement icon. |\n| `isUnlockedIconUrlDefault` | `boolean` Indicates whether the unlocked icon image being returned is a default image, or is game-provided. |\n| `initialState` | `enum (`[InitialAchievementState](/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState)`)` The initial state of the achievement. |\n| `experiencePoints` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Experience points which will be earned when unlocking this achievement. |\n\nAchievementType\n---------------\n\nPossible achievement types.\n\n| Enums ||\n|---------------|-------------------------------------------|\n| `STANDARD` | Achievement is either locked or unlocked. |\n| `INCREMENTAL` | Achievement is incremental. |\n\nInitialAchievementState\n-----------------------\n\nPossible initial states of an achievement.\n\n| Enums ||\n|------------|--------------------------|\n| `HIDDEN` | Achievement is hidden. |\n| `REVEALED` | Achievement is revealed. |\n| `UNLOCKED` | Achievement is unlocked. |"]]