Method: achievements.increment

使用当前已通过身份验证的玩家的指定 ID 递增成就的步骤。

HTTP 请求

POST https://games.googleapis.com/games/v1/achievements/{achievementId}/increment

路径参数

参数
achievementId

string

此方法使用的成就的 ID。

查询参数

参数
requestId

string (int64 format)

为调用方指定的每个请求随机生成的数字 ID。此编号在服务器上使用,以确保在重试后能够正确处理请求。

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 概览