Method: achievements.increment
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מגדיל את שלבי ההישג עם המזהה הנתון של הנגן שאומת כרגע.
בקשת HTTP
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/increment
פרמטרים של נתיב
פרמטרים |
achievementId |
string
המזהה של ההישג בשיטה הזו.
|
פרמטרים של שאילתה
פרמטרים |
requestId |
string (int64 format)
מזהה מספרי שנוצר באופן אקראי לכל בקשה שצוינה על ידי המתקשר. מספר זה משמש בשרת כדי להבטיח שהבקשה תטופל כראוי בניסיונות חוזרים.
|
stepsToIncrement |
integer
חובה. מספר השלבים שצריך לבצע.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
תשובה עם תוספת של הישגים
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
ייצוג JSON |
{
"kind": string,
"currentSteps": integer,
"newlyUnlocked": boolean
} |
שדות |
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#achievementIncrementResponse .
|
currentSteps |
integer
השלבים הנוכחיים שתועדו עבור ההישג המצטבר הזה.
|
newlyUnlocked |
boolean
האם מספר השלבים שנדרשים להישג הגיע למספר השלבים שצריך לבצע כדי לבטל את הנעילה.
|
היקפי ההרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
למידע נוסף, קראו את המאמר סקירה כללית של OAuth 2.0.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Method: achievements.increment\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.IncrementAchievementResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nIncrements the steps of the achievement with the given ID for the currently authenticated player.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/achievements/{achievementId}/increment`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------|\n| `achievementId` | `string` The ID of the achievement used by this method. |\n\n### Query parameters\n\n| Parameters ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries. |\n| `stepsToIncrement` | `integer` Required. The number of steps to increment. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nAn achievement increment response\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"currentSteps\": integer, \"newlyUnlocked\": boolean } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementIncrementResponse`. |\n| `currentSteps` | `integer` The current steps recorded for this incremental achievement. |\n| `newlyUnlocked` | `boolean` Whether the current steps for the achievement has reached the number of steps required to unlock. |\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)."]]