Quests: list

Requires authorization

Get a list of quests for your application and the currently authenticated player. Try it now.

Request

HTTP request

GET https://www.googleapis.com/games/v1/players/playerId/quests

Parameters

Parameter name Value Description
Path parameters
playerId string A player ID. A value of me may be used in place of the authenticated player's ID.
Optional query parameters
consistencyToken long The last-seen mutation timestamp.
language string The preferred language to use for strings returned by this method.
maxResults integer The maximum number of quest resources to return in the response, used for paging. For any response, the actual number of quest resources returned may be less than the specified maxResults. Acceptable values are 1 to 50, inclusive. (Default: 50). Acceptable values are 1 to 50, inclusive.
pageToken string The token returned by the previous request.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/games

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "games#questListResponse",
  "nextPageToken": string,
  "items": [
    {
      "kind": "games#quest",
      "id": string,
      "applicationId": string,
      "name": string,
      "description": string,
      "iconUrl": string,
      "isDefaultIconUrl": boolean,
      "bannerUrl": string,
      "isDefaultBannerUrl": boolean,
      "startTimestampMillis": long,
      "endTimestampMillis": long,
      "acceptedTimestampMillis": long,
      "lastUpdatedTimestampMillis": long,
      "notifyTimestampMillis": long,
      "state": string,
      "milestones": [
        {
          "kind": "games#questMilestone",
          "id": string,
          "criteria": [
            {
              "kind": "games#questCriterion",
              "eventId": string,
              "completionContribution": {
                "kind": "games#questContribution",
                "value": long,
                "formattedValue": string
              },
              "currentContribution": {
                "kind": "games#questContribution",
                "value": long,
                "formattedValue": string
              },
              "initialPlayerProgress": {
                "kind": "games#questContribution",
                "value": long,
                "formattedValue": string
              }
            }
          ],
          "completionRewardData": bytes,
          "state": string
        }
      ]
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questListResponse.
nextPageToken string Token corresponding to the next page of results.
items[] list The quests.
items[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#quest.
items[].id string The ID of the quest.
items[].applicationId string The ID of the application this quest is part of.
items[].name string The name of the quest.
items[].description string The description of the quest.
items[].iconUrl string The icon image URL for the quest.
items[].isDefaultIconUrl boolean Indicates whether the icon image being returned is a default image, or is game-provided.
items[].bannerUrl string The banner image URL for the quest.
items[].isDefaultBannerUrl boolean Indicates whether the banner image being returned is a default image, or is game-provided.
items[].startTimestampMillis long The timestamp at which the quest becomes active in milliseconds since the epoch in UTC.
items[].endTimestampMillis long The timestamp at which the quest ceases to be active in milliseconds since the epoch in UTC.
items[].acceptedTimestampMillis long The timestamp at which the user accepted the quest in milliseconds since the epoch in UTC. Only present if the player has accepted the quest.
items[].lastUpdatedTimestampMillis long The timestamp at which the quest was last updated by the user in milliseconds since the epoch in UTC. Only present if the player has accepted the quest.
items[].notifyTimestampMillis long The timestamp at which the user should be notified that the quest will end soon in milliseconds since the epoch in UTC.
items[].state string The state of the quest.
Possible values are:
  • "UPCOMING": The quest is upcoming. The user can see the quest, but cannot accept it until it is open.
  • "OPEN": The quest is currently open and may be accepted at this time.
  • "ACCEPTED": The user is currently participating in this quest.
  • "COMPLETED": The user has completed the quest.
  • "FAILED": The quest was attempted but was not completed before the deadline expired.
  • "EXPIRED": The quest has expired and was not accepted.
  • "DELETED": The quest should be deleted from the local database.


Acceptable values are:
  • "ACCEPTED"
  • "COMPLETED"
  • "DELETED"
  • "EXPIRED"
  • "FAILED"
  • "OPEN"
  • "UPCOMING"
items[].milestones[] list The quest milestones.
items[].milestones[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questMilestone.
items[].milestones[].id string The milestone ID.
items[].milestones[].criteria[] list The criteria of the milestone.
items[].milestones[].criteria[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questCriterion.
items[].milestones[].criteria[].eventId string The ID of the event the criterion corresponds to.
items[].milestones[].criteria[].completionContribution nested object The total number of times the associated event must be incremented for the player to complete this quest.
items[].milestones[].criteria[].completionContribution.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questContribution.
items[].milestones[].criteria[].completionContribution.value long The value of the contribution.
items[].milestones[].criteria[].completionContribution.formattedValue string The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console.
items[].milestones[].criteria[].currentContribution nested object The number of increments the player has made toward the completion count event increments required to complete the quest. This value will not exceed the completion contribution.
There will be no currentContribution until the player has accepted the quest.
items[].milestones[].criteria[].currentContribution.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questContribution.
items[].milestones[].criteria[].currentContribution.value long The value of the contribution.
items[].milestones[].criteria[].currentContribution.formattedValue string The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console.
items[].milestones[].criteria[].initialPlayerProgress nested object The value of the event associated with this quest at the time that the quest was accepted. This value may change if event increments that took place before the start of quest are uploaded after the quest starts.
There will be no initialPlayerProgress until the player has accepted the quest.
items[].milestones[].criteria[].initialPlayerProgress.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questContribution.
items[].milestones[].criteria[].initialPlayerProgress.value long The value of the contribution.
items[].milestones[].criteria[].initialPlayerProgress.formattedValue string The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console.
items[].milestones[].completionRewardData bytes The completion reward data of the milestone, represented as a Base64-encoded string. This is a developer-specified binary blob with size between 0 and 2 KB before encoding.
items[].milestones[].state string The current state of the milestone.
Possible values are:
  • "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been claimed.
  • "CLAIMED" - The milestone is complete and has been claimed.
  • "NOT_COMPLETED" - The milestone has not yet been completed.
  • "NOT_STARTED" - The milestone is for a quest that has not yet been accepted.


Acceptable values are:
  • "CLAIMED"
  • "COMPLETED_NOT_CLAIMED"
  • "NOT_COMPLETED"
  • "NOT_STARTED"

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Enviar comentarios sobre…

Play Games Services for Web
Play Games Services for Web