Method: achievements.increment
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Incrementa as etapas da conquista com o ID fornecido para o jogador autenticado.
Solicitação HTTP
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/increment
Parâmetros de caminho
Parâmetros |
achievementId |
string
O ID da conquista usada por esse método.
|
Parâmetros de consulta
Parâmetros |
requestId |
string (int64 format)
Um ID numérico gerado aleatoriamente para cada solicitação especificada pelo autor da chamada. Esse número é usado no servidor para garantir que a solicitação seja processada corretamente nas novas tentativas.
|
stepsToIncrement |
integer
Obrigatório. O número de etapas a serem incrementadas.
|
Corpo da solicitação
O corpo da solicitação precisa estar vazio.
Corpo da resposta
Uma resposta de incremento de conquista
Se bem-sucedido, o corpo da resposta incluirá dados com a estrutura a seguir:
Representação JSON |
{
"kind": string,
"currentSteps": integer,
"newlyUnlocked": boolean
} |
Campos |
kind |
string
Identifica exclusivamente o tipo desse recurso. O valor é sempre a string fixa games#achievementIncrementResponse .
|
currentSteps |
integer
As etapas atuais registradas para essa conquista incremental.
|
newlyUnlocked |
boolean
Se as etapas atuais da conquista alcançaram o número necessário para desbloquear.
|
Escopos de autorização
Requer um dos seguintes escopos do OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Para mais informações, consulte a Visão geral do OAuth 2.0.
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[null,null,["Última atualização 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)."]]