Method: achievements.reveal
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Imposta lo stato dell'obiettivo con l'ID specificato su REVEALED
per il giocatore attualmente autenticato.
Richiesta HTTP
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/reveal
Parametri del percorso
Parametri |
achievementId |
string
L'ID dell'obiettivo utilizzato con questo metodo.
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
Risposta alla rivelazione di un obiettivo
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Campi |
kind |
string
Identifica in modo univoco il tipo di questa risorsa. Il valore è sempre la stringa fissa games#achievementRevealResponse .
|
currentState |
enum (RevealAchievementState )
Lo stato attuale dell'obiettivo per cui è stata tentata la rivelazione. Se l'obiettivo è già stato sbloccato, potrebbe essere UNLOCKED .
|
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Per ulteriori informazioni, consulta la panoramica di OAuth 2.0.
RevealAchievementState
Possibili stati di visualizzazione degli obiettivi.
Enum |
REVEALED |
L'obiettivo viene svelato. |
UNLOCKED |
Obiettivo sbloccato. |
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]