Method: achievementDefinitions.list
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Elenca tutte le definizioni degli obiettivi per la tua domanda.
Richiesta HTTP
GET https://games.googleapis.com/games/v1/achievements
Parametri di query
Parametri |
language |
string
La lingua preferita da utilizzare per le stringhe restituite da questo metodo.
|
maxResults |
integer
Il numero massimo di risorse per obiettivi da restituire nella risposta, utilizzate per il paging. Per qualsiasi risposta, il numero effettivo di risorse per gli obiettivi restituite potrebbe essere inferiore al valore maxResults specificato.
|
pageToken |
string
Il token restituito dalla richiesta precedente.
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
Un elenco di oggetti di definizione dei risultati.
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (AchievementDefinition )
}
]
} |
Campi |
kind |
string
Identifica in modo univoco il tipo di questa risorsa. Il valore è sempre la stringa fissa games#achievementDefinitionsListResponse .
|
nextPageToken |
string
Token corrispondente alla pagina successiva dei risultati.
|
items[] |
object (AchievementDefinition )
Definizioni degli obiettivi.
|
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti OAuth:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Per ulteriori informazioni, consulta la panoramica di OAuth 2.0.
AchievementDefinition
Un oggetto definizione obiettivo.
Rappresentazione JSON |
{
"kind": string,
"id": string,
"name": string,
"description": string,
"achievementType": enum (AchievementType ),
"totalSteps": integer,
"formattedTotalSteps": string,
"revealedIconUrl": string,
"isRevealedIconUrlDefault": boolean,
"unlockedIconUrl": string,
"isUnlockedIconUrlDefault": boolean,
"initialState": enum (InitialAchievementState ),
"experiencePoints": string
} |
Campi |
kind |
string
Identifica in modo univoco il tipo di questa risorsa. Il valore è sempre la stringa fissa games#achievementDefinition .
|
id |
string
L'ID dell'obiettivo.
|
name |
string
Il nome dell'obiettivo.
|
description |
string
La descrizione dell'obiettivo.
|
achievementType |
enum (AchievementType )
Il tipo di risultato.
|
totalSteps |
integer
I passaggi totali per un obiettivo incrementale.
|
formattedTotalSteps |
string
I passaggi totali per un obiettivo incrementale come stringa.
|
revealedIconUrl |
string
L'URL dell'immagine dell'icona dell'obiettivo visualizzata.
|
isRevealedIconUrlDefault |
boolean
Indica se l'immagine dell'icona mostrata che viene restituita è un'immagine predefinita o è fornita dal gioco.
|
unlockedIconUrl |
string
L'URL dell'immagine dell'icona dell'obiettivo sbloccato.
|
isUnlockedIconUrlDefault |
boolean
Indica se l'immagine dell'icona sbloccata che viene restituita è un'immagine predefinita o se è fornita dal gioco.
|
initialState |
enum (InitialAchievementState )
Lo stato iniziale del risultato.
|
experiencePoints |
string (int64 format)
Punti esperienza che verranno guadagnati quando sblocchi questo obiettivo.
|
AchievementType
Possibili tipi di obiettivi.
Enum |
STANDARD |
L'obiettivo è bloccato o sbloccato. |
INCREMENTAL |
L'obiettivo è incrementale. |
InitialAchievementState
Possibili stati iniziali di un obiettivo.
Enum |
HIDDEN |
L'obiettivo è nascosto. |
REVEALED |
L'obiettivo viene svelato. |
UNLOCKED |
Obiettivo sbloccato. |
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# Method: achievementDefinitions.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListAchievementDefinitionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [AchievementDefinition](#AchievementDefinition)\n - [JSON representation](#AchievementDefinition.SCHEMA_REPRESENTATION)\n- [AchievementType](#AchievementType)\n- [InitialAchievementState](#InitialAchievementState)\n- [Try it!](#try-it)\n\nLists all the achievement definitions for your application.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/achievements`\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\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA list of achievement definition 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/achievementDefinitions/list#AchievementDefinition) } ] } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementDefinitionsListResponse`. |\n| `nextPageToken` | `string` Token corresponding to the next page of results. |\n| `items[]` | `object (`[AchievementDefinition](/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementDefinition)`)` The achievement definitions. |\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\nAchievementDefinition\n---------------------\n\nAn achievement definition object.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"id\": string, \"name\": string, \"description\": string, \"achievementType\": enum (/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType), \"totalSteps\": integer, \"formattedTotalSteps\": string, \"revealedIconUrl\": string, \"isRevealedIconUrlDefault\": boolean, \"unlockedIconUrl\": string, \"isUnlockedIconUrlDefault\": boolean, \"initialState\": enum (/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState), \"experiencePoints\": string } ``` |\n\n| Fields ||\n|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementDefinition`. |\n| `id` | `string` The ID of the achievement. |\n| `name` | `string` The name of the achievement. |\n| `description` | `string` The description of the achievement. |\n| `achievementType` | `enum (`[AchievementType](/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType)`)` The type of the achievement. |\n| `totalSteps` | `integer` The total steps for an incremental achievement. |\n| `formattedTotalSteps` | `string` The total steps for an incremental achievement as a string. |\n| `revealedIconUrl` | `string` The image URL for the revealed achievement icon. |\n| `isRevealedIconUrlDefault` | `boolean` Indicates whether the revealed icon image being returned is a default image, or is provided by the game. |\n| `unlockedIconUrl` | `string` The image URL for the unlocked achievement icon. |\n| `isUnlockedIconUrlDefault` | `boolean` Indicates whether the unlocked icon image being returned is a default image, or is game-provided. |\n| `initialState` | `enum (`[InitialAchievementState](/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState)`)` The initial state of the achievement. |\n| `experiencePoints` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Experience points which will be earned when unlocking this achievement. |\n\nAchievementType\n---------------\n\nPossible achievement types.\n\n| Enums ||\n|---------------|-------------------------------------------|\n| `STANDARD` | Achievement is either locked or unlocked. |\n| `INCREMENTAL` | Achievement is incremental. |\n\nInitialAchievementState\n-----------------------\n\nPossible initial states of an achievement.\n\n| Enums ||\n|------------|--------------------------|\n| `HIDDEN` | Achievement is hidden. |\n| `REVEALED` | Achievement is revealed. |\n| `UNLOCKED` | Achievement is unlocked. |"]]