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