Method: achievements.reveal
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מגדיר את מצב ההישג עם המזהה הנתון כ-REVEALED
עבור הנגן המאומת הנוכחי.
בקשת HTTP
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/reveal
פרמטרים של נתיב
פרמטרים |
achievementId |
string
המזהה של ההישג בשיטה הזו.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
תשובה לחשיפת הישג
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
שדות |
kind |
string
מזהה באופן ייחודי את סוג המשאב הזה. הערך הוא תמיד המחרוזת הקבועה games#achievementRevealResponse .
|
currentState |
enum (RevealAchievementState )
המצב הנוכחי של ההישג שעבורו נעשה ניסיון חשיפה. אם ההישג כבר לא נעול, הערך יכול להיות UNLOCKED .
|
היקפי ההרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
למידע נוסף, קראו את המאמר סקירה כללית של OAuth 2.0.
RevealAchievementState
מצבים של הישג חשיפה אפשרי.
טיפוסים בני מנייה (enum) |
REVEALED |
ההישג ייחשף. |
UNLOCKED |
ההישג בוטלה. |
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Method: achievements.reveal\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.RevealAchievementResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [RevealAchievementState](#RevealAchievementState)\n- [Try it!](#try-it)\n\nSets the state of the achievement with the given ID to `REVEALED` for the currently authenticated player.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/achievements/{achievementId}/reveal`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------|\n| `achievementId` | `string` The ID of the achievement used by this method. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nAn achievement reveal response\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"currentState\": enum (/games/services/web/api/rest/v1/achievements/reveal#RevealAchievementState) } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementRevealResponse`. |\n| `currentState` | `enum (`[RevealAchievementState](/games/services/web/api/rest/v1/achievements/reveal#RevealAchievementState)`)` The current state of the achievement for which a reveal was attempted. This might be `UNLOCKED` if the achievement was already unlocked. |\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\nRevealAchievementState\n----------------------\n\nPossible reveal achievement states.\n\n| Enums ||\n|------------|--------------------------|\n| `REVEALED` | Achievement is revealed. |\n| `UNLOCKED` | Achievement is unlocked. |"]]