Method: achievements.setStepsAtLeast
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
設定目前驗證玩家解鎖成就的步驟。如果步數參數少於玩家目前獲得的成就步數,則成就不會遭到修改。
HTTP 要求
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/setStepsAtLeast
路徑參數
參數 |
achievementId |
string
這個方法使用的成就 ID。
|
查詢參數
參數 |
steps |
integer
必要欄位。這些步驟的最小值,
|
回應主體
成就組步驟至少回應。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"kind": string,
"currentSteps": integer,
"newlyUnlocked": boolean
} |
欄位 |
kind |
string
專門用於識別這項資源的類型。值一律為固定字串 games#achievementSetStepsAtLeastResponse 。
|
currentSteps |
integer
此漸進式成就目前記錄到的步驟。
|
newlyUnlocked |
boolean
成就目前的步驟是否已經達到解鎖所需的步驟數。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
詳情請參閱 OAuth 2.0 總覽。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],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)."]]