Method: achievements.list
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Wyświetla postęp wszystkich osiągnięć Twojej aplikacji dla obecnie uwierzytelnionego gracza.
Żądanie HTTP
GET https://games.googleapis.com/games/v1/players/{playerId}/achievements
Parametry ścieżki
Parametry |
playerId |
string
Identyfikator gracza. Zamiast identyfikatora uwierzytelnionego gracza może zostać użyta wartość me .
|
Parametry zapytania
Parametry |
language |
string
Preferowany język używany w przypadku ciągów znaków zwracanych przez tę metodę.
|
maxResults |
integer
Maksymalna liczba zasobów osiągnięć do zwrócenia w odpowiedzi, używanych na potrzeby stronicowania. W przypadku każdej odpowiedzi rzeczywista liczba zwróconych zasobów osiągnięć może być mniejsza od określonej wartości maxResults .
|
pageToken |
string
Token zwrócony przez poprzednie żądanie.
|
state |
enum (State )
Powoduje, że serwer zwraca tylko osiągnięcia w określonym stanie. Jeśli ten parametr nie jest określony, zwracane są wszystkie osiągnięcia.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
Lista obiektów osiągnięć.
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (PlayerAchievement )
}
]
} |
Pola |
kind |
string
Jednoznacznie identyfikuje typ tego zasobu. Wartością jest zawsze stały ciąg znaków games#playerAchievementListResponse .
|
nextPageToken |
string
Token odpowiadający następnej stronie wyników.
|
items[] |
object (PlayerAchievement )
Osiągnięcia.
|
Zakresy autoryzacji
Wymaga jednego z tych zakresów protokołu OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Więcej informacji znajdziesz w artykule Omówienie protokołu OAuth 2.0.
Stan
Wartości w polu enum |
ALL |
Wymień wszystkie osiągnięcia. Jest to ustawienie domyślne. |
HIDDEN |
Wymień tylko ukryte osiągnięcia. |
REVEALED |
Sporządź listę tylko odkrytych osiągnięć. |
UNLOCKED |
Wyświetl tylko odblokowane osiągnięcia. |
PlayerAchievement
Zapis JSON |
{
"kind": string,
"id": string,
"currentSteps": integer,
"formattedCurrentStepsString": string,
"achievementState": enum (State ),
"lastUpdatedTimestamp": string,
"experiencePoints": string
} |
Pola |
kind |
string
Jednoznacznie identyfikuje typ tego zasobu. Wartością jest zawsze stały ciąg znaków games#playerAchievement .
|
id |
string
Identyfikator osiągnięcia.
|
currentSteps |
integer
Bieżące kroki osiągnięcia stopniowego osiągnięcia.
|
formattedCurrentStepsString |
string
Bieżące kroki osiągnięcia przyrostowego w postaci ciągu znaków.
|
achievementState |
enum (State )
Stan osiągnięcia.
|
lastUpdatedTimestamp |
string (int64 format)
Sygnatura czasowa ostatniej modyfikacji stanu osiągnięcia.
|
experiencePoints |
string (int64 format)
Punkty doświadczenia zdobyte za osiągnięcie. Pole brakuje w przypadku osiągnięć, które nie zostały jeszcze odblokowane, oraz 0 w przypadku osiągnięć, które zostały odblokowane przez testerów, ale nie zostały opublikowane.
|
Stan
Definiuje możliwe stany osiągnięcia.
Wartości w polu enum |
HIDDEN |
Osiągnięcie jest ukryte. |
REVEALED |
Osiągnięcie jest widoczne. |
UNLOCKED |
Osiągnięcie zostało odblokowane. |
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]