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 總覽