Method: achievements.setStepsAtLeast
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Consente di impostare i passaggi che il giocatore attualmente autenticato deve seguire per sbloccare un obiettivo. Se il parametro dei passaggi è inferiore al numero corrente di passi già ottenuti dal giocatore per l'obiettivo, quest'ultimo non viene modificato.
Richiesta HTTP
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/setStepsAtLeast
Parametri del percorso
Parametri |
achievementId |
string
L'ID dell'obiettivo utilizzato con questo metodo.
|
Parametri di query
Parametri |
steps |
integer
Obbligatorio. Il valore minimo su cui impostare i passaggi.
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
Imposta almeno una risposta per un obiettivo.
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"kind": string,
"currentSteps": integer,
"newlyUnlocked": boolean
} |
Campi |
kind |
string
Identifica in modo univoco il tipo di questa risorsa. Il valore è sempre la stringa fissa games#achievementSetStepsAtLeastResponse .
|
currentSteps |
integer
I passaggi attuali registrati per questo obiettivo incrementale.
|
newlyUnlocked |
boolean
Se i passaggi attuali per l'obiettivo hanno raggiunto il numero di passaggi necessari per sbloccare.
|
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.
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.setStepsAtLeast\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.SetAchievementStepsAtLeastResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nSets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/achievements/{achievementId}/setStepsAtLeast`\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| `steps` | `integer` Required. The minimum value to set the steps to. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nAn achievement set steps at least 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#achievementSetStepsAtLeastResponse`. |\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)."]]