Method: achievements.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงความคืบหน้าสำหรับรางวัลพิเศษทั้งหมดของแอปพลิเคชันของคุณสำหรับโปรแกรมเล่นที่ตรวจสอบสิทธิ์แล้วในปัจจุบัน
คำขอ HTTP
GET https://games.googleapis.com/games/v1/players/{playerId}/achievements
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
playerId |
string
รหัสผู้เล่น ระบบอาจใช้ค่า me แทนรหัสของโปรแกรมเล่นที่ตรวจสอบสิทธิ์แล้ว
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
language |
string
ภาษาที่ต้องการใช้สำหรับสตริงที่แสดงผลโดยวิธีการนี้
|
maxResults |
integer
จำนวนทรัพยากรรางวัลพิเศษสูงสุดที่จะแสดงผลในการตอบสนอง ซึ่งใช้สำหรับการแบ่งหน้า สำหรับการตอบกลับ จำนวนทรัพยากรของรางวัลพิเศษที่แสดงจริงอาจน้อยกว่า maxResults ที่ระบุ
|
pageToken |
string
โทเค็นที่ส่งกลับโดยคำขอก่อนหน้า
|
state |
enum (State )
กำหนดให้เซิร์ฟเวอร์แสดงผลเฉพาะรางวัลพิเศษที่มีสถานะที่ระบุ หากไม่ได้ระบุพารามิเตอร์นี้ ระบบจะแสดงผลรางวัลพิเศษทั้งหมด
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
รายการออบเจ็กต์รางวัลพิเศษ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (PlayerAchievement )
}
]
} |
ช่อง |
kind |
string
ระบุประเภทของทรัพยากรนี้โดยไม่ซ้ำกัน ค่าเป็นสตริงคงที่ games#playerAchievementListResponse เสมอ
|
nextPageToken |
string
โทเค็นที่ตรงกับผลการค้นหาหน้าถัดไป
|
items[] |
object (PlayerAchievement )
ความสำเร็จ
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth รายการใดรายการหนึ่งต่อไปนี้
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
สำหรับข้อมูลเพิ่มเติม โปรดดูที่ภาพรวมของ OAuth 2.0
รัฐ
Enum |
ALL |
แสดงรางวัลพิเศษทั้งหมด โดยตัวเลือกนี้คือค่าเริ่มต้น |
HIDDEN |
แสดงเฉพาะรางวัลพิเศษที่ซ่อนอยู่ |
REVEALED |
แสดงเฉพาะรางวัลพิเศษที่เปิดเผย |
UNLOCKED |
แสดงเฉพาะรางวัลพิเศษที่ปลดล็อก |
PlayerAchievement
การแสดง JSON |
{
"kind": string,
"id": string,
"currentSteps": integer,
"formattedCurrentStepsString": string,
"achievementState": enum (State ),
"lastUpdatedTimestamp": string,
"experiencePoints": string
} |
ช่อง |
kind |
string
ระบุประเภทของทรัพยากรนี้โดยไม่ซ้ำกัน ค่าเป็นสตริงคงที่ games#playerAchievement เสมอ
|
id |
string
รหัสของรางวัลพิเศษ
|
currentSteps |
integer
ขั้นตอนปัจจุบันสำหรับรางวัลพิเศษแบบเพิ่มขึ้นเรื่อยๆ
|
formattedCurrentStepsString |
string
ขั้นตอนปัจจุบันสำหรับรางวัลพิเศษแบบเพิ่มขึ้นเรื่อยๆ เป็นสตริง
|
achievementState |
enum (State )
สถานะของรางวัลพิเศษ
|
lastUpdatedTimestamp |
string (int64 format)
การประทับเวลาของการแก้ไขสถานะของรางวัลพิเศษนี้ครั้งล่าสุด
|
experiencePoints |
string (int64 format)
คะแนนประสบการณ์ที่ได้รับจากรางวัลพิเศษนี้ ช่องนี้จะไม่มีสำหรับรางวัลพิเศษที่ยังไม่ได้ปลดล็อก และ 0 สำหรับรางวัลพิเศษที่ผู้ทดสอบปลดล็อกแล้วแต่ยังไม่ได้เผยแพร่
|
รัฐ
กำหนดสถานะที่เป็นไปได้ของรางวัลพิเศษ
Enum |
HIDDEN |
รางวัลพิเศษซ่อนอยู่ |
REVEALED |
รางวัลพิเศษจะปรากฏขึ้น |
UNLOCKED |
รางวัลพิเศษถูกปลดล็อก |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# Method: achievements.list\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.ListAchievementsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [State](#State)\n- [PlayerAchievement](#PlayerAchievement)\n - [JSON representation](#PlayerAchievement.SCHEMA_REPRESENTATION)\n- [State](#State_1)\n- [Try it!](#try-it)\n\nLists the progress for all your application's achievements for the currently authenticated player.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/players/{playerId}/achievements`\n\n### Path parameters\n\n| Parameters ||\n|------------|----------------------------------------------------------------------------------------------|\n| `playerId` | `string` A player ID. A value of `me` may be used in place of the authenticated player's ID. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `maxResults` | `integer` The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified `maxResults`. |\n| `pageToken` | `string` The token returned by the previous request. |\n| `state` | `enum (`[State](/games/services/web/api/rest/v1/achievements/list#State)`)` Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA list of achievement objects.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"nextPageToken\": string, \"items\": [ { object (/games/services/web/api/rest/v1/achievements/list#PlayerAchievement) } ] } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#playerAchievementListResponse`. |\n| `nextPageToken` | `string` Token corresponding to the next page of results. |\n| `items[]` | `object (`[PlayerAchievement](/games/services/web/api/rest/v1/achievements/list#PlayerAchievement)`)` The achievements. |\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).\n\nState\n-----\n\n| Enums ||\n|------------|---------------------------------------------|\n| `ALL` | List all achievements. This is the default. |\n| `HIDDEN` | List only hidden achievements. |\n| `REVEALED` | List only revealed achievements. |\n| `UNLOCKED` | List only unlocked achievements. |\n\nPlayerAchievement\n-----------------\n\nAn achievement object.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"id\": string, \"currentSteps\": integer, \"formattedCurrentStepsString\": string, \"achievementState\": enum (/games/services/web/api/rest/v1/achievements/list#State_1), \"lastUpdatedTimestamp\": string, \"experiencePoints\": string } ``` |\n\n| Fields ||\n|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#playerAchievement`. |\n| `id` | `string` The ID of the achievement. |\n| `currentSteps` | `integer` The current steps for an incremental achievement. |\n| `formattedCurrentStepsString` | `string` The current steps for an incremental achievement as a string. |\n| `achievementState` | `enum (`[State](/games/services/web/api/rest/v1/achievements/list#State_1)`)` The state of the achievement. |\n| `lastUpdatedTimestamp` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The timestamp of the last modification to this achievement's state. |\n| `experiencePoints` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Experience points earned for the achievement. This field is absent for achievements that have not yet been unlocked and 0 for achievements that have been unlocked by testers but that are unpublished. |\n\nState\n-----\n\nDefines possible states of an achievement.\n\n| Enums ||\n|------------|--------------------------|\n| `HIDDEN` | Achievement is hidden. |\n| `REVEALED` | Achievement is revealed. |\n| `UNLOCKED` | Achievement is unlocked. |"]]