googleapis
Version:
Google APIs Client Library for Node.js
1,728 lines • 148 kB
TypeScript
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { GoogleApis } from '../..';
import { BodyResponseCallback, GlobalOptions, MethodOptions } from '../../lib/api';
/**
* Google Play Game Services API
*
* The API for Google Play Game Services.
*
* @example
* const google = require('googleapis');
* const games = google.games('v1');
*
* @namespace games
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Games
*/
export declare class Games {
_options: GlobalOptions;
google: GoogleApis;
root: this;
achievementDefinitions: Resource$Achievementdefinitions;
achievements: Resource$Achievements;
applications: Resource$Applications;
events: Resource$Events;
leaderboards: Resource$Leaderboards;
metagame: Resource$Metagame;
players: Resource$Players;
pushtokens: Resource$Pushtokens;
questMilestones: Resource$Questmilestones;
quests: Resource$Quests;
revisions: Resource$Revisions;
rooms: Resource$Rooms;
scores: Resource$Scores;
snapshots: Resource$Snapshots;
turnBasedMatches: Resource$Turnbasedmatches;
constructor(options: GlobalOptions, google: GoogleApis);
getRoot(): this;
}
/**
* This is a JSON template for an achievement definition object.
*/
export interface Schema$AchievementDefinition {
/**
* The type of the achievement. Possible values are: - "STANDARD"
* - Achievement is either locked or unlocked. - "INCREMENTAL" -
* Achievement is incremental.
*/
achievementType: string;
/**
* The description of the achievement.
*/
description: string;
/**
* Experience points which will be earned when unlocking this achievement.
*/
experiencePoints: string;
/**
* The total steps for an incremental achievement as a string.
*/
formattedTotalSteps: string;
/**
* The ID of the achievement.
*/
id: string;
/**
* The initial state of the achievement. Possible values are: -
* "HIDDEN" - Achievement is hidden. - "REVEALED" -
* Achievement is revealed. - "UNLOCKED" - Achievement is unlocked.
*/
initialState: string;
/**
* Indicates whether the revealed icon image being returned is a default
* image, or is provided by the game.
*/
isRevealedIconUrlDefault: boolean;
/**
* Indicates whether the unlocked icon image being returned is a default
* image, or is game-provided.
*/
isUnlockedIconUrlDefault: boolean;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementDefinition.
*/
kind: string;
/**
* The name of the achievement.
*/
name: string;
/**
* The image URL for the revealed achievement icon.
*/
revealedIconUrl: string;
/**
* The total steps for an incremental achievement.
*/
totalSteps: number;
/**
* The image URL for the unlocked achievement icon.
*/
unlockedIconUrl: string;
}
/**
* This is a JSON template for a list of achievement definition objects.
*/
export interface Schema$AchievementDefinitionsListResponse {
/**
* The achievement definitions.
*/
items: Schema$AchievementDefinition[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementDefinitionsListResponse.
*/
kind: string;
/**
* Token corresponding to the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for an achievement increment response
*/
export interface Schema$AchievementIncrementResponse {
/**
* The current steps recorded for this incremental achievement.
*/
currentSteps: number;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementIncrementResponse.
*/
kind: string;
/**
* Whether the current steps for the achievement has reached the number of
* steps required to unlock.
*/
newlyUnlocked: boolean;
}
/**
* This is a JSON template for an achievement reveal response
*/
export interface Schema$AchievementRevealResponse {
/**
* The current state of the achievement for which a reveal was attempted. This
* might be UNLOCKED if the achievement was already unlocked. Possible values
* are: - "REVEALED" - Achievement is revealed. -
* "UNLOCKED" - Achievement is unlocked.
*/
currentState: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementRevealResponse.
*/
kind: string;
}
/**
* This is a JSON template for an achievement set steps at least response.
*/
export interface Schema$AchievementSetStepsAtLeastResponse {
/**
* The current steps recorded for this incremental achievement.
*/
currentSteps: number;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementSetStepsAtLeastResponse.
*/
kind: string;
/**
* Whether the the current steps for the achievement has reached the number of
* steps required to unlock.
*/
newlyUnlocked: boolean;
}
/**
* This is a JSON template for an achievement unlock response
*/
export interface Schema$AchievementUnlockResponse {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementUnlockResponse.
*/
kind: string;
/**
* Whether this achievement was newly unlocked (that is, whether the unlock
* request for the achievement was the first for the player).
*/
newlyUnlocked: boolean;
}
/**
* This is a JSON template for a list of achievement update requests.
*/
export interface Schema$AchievementUpdateMultipleRequest {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementUpdateMultipleRequest.
*/
kind: string;
/**
* The individual achievement update requests.
*/
updates: Schema$AchievementUpdateRequest[];
}
/**
* This is a JSON template for an achievement unlock response.
*/
export interface Schema$AchievementUpdateMultipleResponse {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementUpdateListResponse.
*/
kind: string;
/**
* The updated state of the achievements.
*/
updatedAchievements: Schema$AchievementUpdateResponse[];
}
/**
* This is a JSON template for a request to update an achievement.
*/
export interface Schema$AchievementUpdateRequest {
/**
* The achievement this update is being applied to.
*/
achievementId: string;
/**
* The payload if an update of type INCREMENT was requested for the
* achievement.
*/
incrementPayload: Schema$GamesAchievementIncrement;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementUpdateRequest.
*/
kind: string;
/**
* The payload if an update of type SET_STEPS_AT_LEAST was requested for the
* achievement.
*/
setStepsAtLeastPayload: Schema$GamesAchievementSetStepsAtLeast;
/**
* The type of update being applied. Possible values are: -
* "REVEAL" - Achievement is revealed. - "UNLOCK" -
* Achievement is unlocked. - "INCREMENT" - Achievement is
* incremented. - "SET_STEPS_AT_LEAST" - Achievement progress is
* set to at least the passed value.
*/
updateType: string;
}
/**
* This is a JSON template for an achievement update response.
*/
export interface Schema$AchievementUpdateResponse {
/**
* The achievement this update is was applied to.
*/
achievementId: string;
/**
* The current state of the achievement. Possible values are: -
* "HIDDEN" - Achievement is hidden. - "REVEALED" -
* Achievement is revealed. - "UNLOCKED" - Achievement is unlocked.
*/
currentState: string;
/**
* The current steps recorded for this achievement if it is incremental.
*/
currentSteps: number;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#achievementUpdateResponse.
*/
kind: string;
/**
* Whether this achievement was newly unlocked (that is, whether the unlock
* request for the achievement was the first for the player).
*/
newlyUnlocked: boolean;
/**
* Whether the requested updates actually affected the achievement.
*/
updateOccurred: boolean;
}
/**
* This is a JSON template for aggregate stats.
*/
export interface Schema$AggregateStats {
/**
* The number of messages sent between a pair of peers.
*/
count: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#aggregateStats.
*/
kind: string;
/**
* The maximum amount.
*/
max: string;
/**
* The minimum amount.
*/
min: string;
/**
* The total number of bytes sent for messages between a pair of peers.
*/
sum: string;
}
/**
* This is a JSON template for an anonymous player
*/
export interface Schema$AnonymousPlayer {
/**
* The base URL for the image to display for the anonymous player.
*/
avatarImageUrl: string;
/**
* The name to display for the anonymous player.
*/
displayName: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#anonymousPlayer.
*/
kind: string;
}
/**
* This is a JSON template for the Application resource.
*/
export interface Schema$Application {
/**
* The number of achievements visible to the currently authenticated player.
*/
achievement_count: number;
/**
* The assets of the application.
*/
assets: Schema$ImageAsset[];
/**
* The author of the application.
*/
author: string;
/**
* The category of the application.
*/
category: Schema$ApplicationCategory;
/**
* The description of the application.
*/
description: string;
/**
* A list of features that have been enabled for the application. Possible
* values are: - "SNAPSHOTS" - Snapshots has been enabled
*/
enabledFeatures: string[];
/**
* The ID of the application.
*/
id: string;
/**
* The instances of the application.
*/
instances: Schema$Instance[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#application.
*/
kind: string;
/**
* The last updated timestamp of the application.
*/
lastUpdatedTimestamp: string;
/**
* The number of leaderboards visible to the currently authenticated player.
*/
leaderboard_count: number;
/**
* The name of the application.
*/
name: string;
/**
* A hint to the client UI for what color to use as an app-themed color. The
* color is given as an RGB triplet (e.g. "E0E0E0").
*/
themeColor: string;
}
/**
* This is a JSON template for an application category object.
*/
export interface Schema$ApplicationCategory {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#applicationCategory.
*/
kind: string;
/**
* The primary category.
*/
primary: string;
/**
* The secondary category.
*/
secondary: string;
}
/**
* This is a JSON template for a third party application verification response
* resource.
*/
export interface Schema$ApplicationVerifyResponse {
/**
* An alternate ID that was once used for the player that was issued the auth
* token used in this request. (This field is not normally populated.)
*/
alternate_player_id: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#applicationVerifyResponse.
*/
kind: string;
/**
* The ID of the player that was issued the auth token used in this request.
*/
player_id: string;
}
/**
* This is a JSON template for data related to individual game categories.
*/
export interface Schema$Category {
/**
* The category name.
*/
category: string;
/**
* Experience points earned in this category.
*/
experiencePoints: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#category.
*/
kind: string;
}
/**
* This is a JSON template for a list of category data objects.
*/
export interface Schema$CategoryListResponse {
/**
* The list of categories with usage data.
*/
items: Schema$Category[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#categoryListResponse.
*/
kind: string;
/**
* Token corresponding to the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for a batch update failure resource.
*/
export interface Schema$EventBatchRecordFailure {
/**
* The cause for the update failure. Possible values are: -
* "TOO_LARGE": A batch request was issued with more events than are
* allowed in a single batch. - "TIME_PERIOD_EXPIRED": A batch was
* sent with data too far in the past to record. -
* "TIME_PERIOD_SHORT": A batch was sent with a time range that was
* too short. - "TIME_PERIOD_LONG": A batch was sent with a time
* range that was too long. - "ALREADY_UPDATED": An attempt was
* made to record a batch of data which was already seen. -
* "RECORD_RATE_HIGH": An attempt was made to record data faster
* than the server will apply updates.
*/
failureCause: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventBatchRecordFailure.
*/
kind: string;
/**
* The time range which was rejected; empty for a request-wide failure.
*/
range: Schema$EventPeriodRange;
}
/**
* This is a JSON template for an event child relationship resource.
*/
export interface Schema$EventChild {
/**
* The ID of the child event.
*/
childId: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventChild.
*/
kind: string;
}
/**
* This is a JSON template for an event definition resource.
*/
export interface Schema$EventDefinition {
/**
* A list of events that are a child of this event.
*/
childEvents: Schema$EventChild[];
/**
* Description of what this event represents.
*/
description: string;
/**
* The name to display for the event.
*/
displayName: string;
/**
* The ID of the event.
*/
id: string;
/**
* The base URL for the image that represents the event.
*/
imageUrl: string;
/**
* Indicates whether the icon image being returned is a default image, or is
* game-provided.
*/
isDefaultImageUrl: boolean;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventDefinition.
*/
kind: string;
/**
* The visibility of event being tracked in this definition. Possible values
* are: - "REVEALED": This event should be visible to all users.
* - "HIDDEN": This event should only be shown to users that have
* recorded this event at least once.
*/
visibility: string;
}
/**
* This is a JSON template for a ListDefinitions response.
*/
export interface Schema$EventDefinitionListResponse {
/**
* The event definitions.
*/
items: Schema$EventDefinition[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventDefinitionListResponse.
*/
kind: string;
/**
* The pagination token for the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for an event period time range.
*/
export interface Schema$EventPeriodRange {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventPeriodRange.
*/
kind: string;
/**
* The time when this update period ends, in millis, since 1970 UTC (Unix
* Epoch).
*/
periodEndMillis: string;
/**
* The time when this update period begins, in millis, since 1970 UTC (Unix
* Epoch).
*/
periodStartMillis: string;
}
/**
* This is a JSON template for an event period update resource.
*/
export interface Schema$EventPeriodUpdate {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventPeriodUpdate.
*/
kind: string;
/**
* The time period being covered by this update.
*/
timePeriod: Schema$EventPeriodRange;
/**
* The updates being made for this time period.
*/
updates: Schema$EventUpdateRequest[];
}
/**
* This is a JSON template for an event update failure resource.
*/
export interface Schema$EventRecordFailure {
/**
* The ID of the event that was not updated.
*/
eventId: string;
/**
* The cause for the update failure. Possible values are: -
* "NOT_FOUND" - An attempt was made to set an event that was not
* defined. - "INVALID_UPDATE_VALUE" - An attempt was made to
* increment an event by a non-positive value.
*/
failureCause: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventRecordFailure.
*/
kind: string;
}
/**
* This is a JSON template for an event period update resource.
*/
export interface Schema$EventRecordRequest {
/**
* The current time when this update was sent, in milliseconds, since 1970 UTC
* (Unix Epoch).
*/
currentTimeMillis: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventRecordRequest.
*/
kind: string;
/**
* The request ID used to identify this attempt to record events.
*/
requestId: string;
/**
* A list of the time period updates being made in this request.
*/
timePeriods: Schema$EventPeriodUpdate[];
}
/**
* This is a JSON template for an event period update resource.
*/
export interface Schema$EventUpdateRequest {
/**
* The ID of the event being modified in this update.
*/
definitionId: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventUpdateRequest.
*/
kind: string;
/**
* The number of times this event occurred in this time period.
*/
updateCount: string;
}
/**
* This is a JSON template for an event period update resource.
*/
export interface Schema$EventUpdateResponse {
/**
* Any batch-wide failures which occurred applying updates.
*/
batchFailures: Schema$EventBatchRecordFailure[];
/**
* Any failures updating a particular event.
*/
eventFailures: Schema$EventRecordFailure[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#eventUpdateResponse.
*/
kind: string;
/**
* The current status of any updated events
*/
playerEvents: Schema$PlayerEvent[];
}
/**
* This is a JSON template for the payload to request to increment an
* achievement.
*/
export interface Schema$GamesAchievementIncrement {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#GamesAchievementIncrement.
*/
kind: string;
/**
* The requestId associated with an increment to an achievement.
*/
requestId: string;
/**
* The number of steps to be incremented.
*/
steps: number;
}
/**
* This is a JSON template for the payload to request to increment an
* achievement.
*/
export interface Schema$GamesAchievementSetStepsAtLeast {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#GamesAchievementSetStepsAtLeast.
*/
kind: string;
/**
* The minimum number of steps for the achievement to be set to.
*/
steps: number;
}
/**
* This is a JSON template for an image asset object.
*/
export interface Schema$ImageAsset {
/**
* The height of the asset.
*/
height: number;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#imageAsset.
*/
kind: string;
/**
* The name of the asset.
*/
name: string;
/**
* The URL of the asset.
*/
url: string;
/**
* The width of the asset.
*/
width: number;
}
/**
* This is a JSON template for the Instance resource.
*/
export interface Schema$Instance {
/**
* URI which shows where a user can acquire this instance.
*/
acquisitionUri: string;
/**
* Platform dependent details for Android.
*/
androidInstance: Schema$InstanceAndroidDetails;
/**
* Platform dependent details for iOS.
*/
iosInstance: Schema$InstanceIosDetails;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#instance.
*/
kind: string;
/**
* Localized display name.
*/
name: string;
/**
* The platform type. Possible values are: - "ANDROID" - Instance
* is for Android. - "IOS" - Instance is for iOS -
* "WEB_APP" - Instance is for Web App.
*/
platformType: string;
/**
* Flag to show if this game instance supports realtime play.
*/
realtimePlay: boolean;
/**
* Flag to show if this game instance supports turn based play.
*/
turnBasedPlay: boolean;
/**
* Platform dependent details for Web.
*/
webInstance: Schema$InstanceWebDetails;
}
/**
* This is a JSON template for the Android instance details resource.
*/
export interface Schema$InstanceAndroidDetails {
/**
* Flag indicating whether the anti-piracy check is enabled.
*/
enablePiracyCheck: boolean;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#instanceAndroidDetails.
*/
kind: string;
/**
* Android package name which maps to Google Play URL.
*/
packageName: string;
/**
* Indicates that this instance is the default for new installations.
*/
preferred: boolean;
}
/**
* This is a JSON template for the iOS details resource.
*/
export interface Schema$InstanceIosDetails {
/**
* Bundle identifier.
*/
bundleIdentifier: string;
/**
* iTunes App ID.
*/
itunesAppId: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#instanceIosDetails.
*/
kind: string;
/**
* Indicates that this instance is the default for new installations on iPad
* devices.
*/
preferredForIpad: boolean;
/**
* Indicates that this instance is the default for new installations on iPhone
* devices.
*/
preferredForIphone: boolean;
/**
* Flag to indicate if this instance supports iPad.
*/
supportIpad: boolean;
/**
* Flag to indicate if this instance supports iPhone.
*/
supportIphone: boolean;
}
/**
* This is a JSON template for the Web details resource.
*/
export interface Schema$InstanceWebDetails {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#instanceWebDetails.
*/
kind: string;
/**
* Launch URL for the game.
*/
launchUrl: string;
/**
* Indicates that this instance is the default for new installations.
*/
preferred: boolean;
}
/**
* This is a JSON template for the Leaderboard resource.
*/
export interface Schema$Leaderboard {
/**
* The icon for the leaderboard.
*/
iconUrl: string;
/**
* The leaderboard ID.
*/
id: string;
/**
* Indicates whether the icon image being returned is a default image, or is
* game-provided.
*/
isIconUrlDefault: boolean;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#leaderboard.
*/
kind: string;
/**
* The name of the leaderboard.
*/
name: string;
/**
* How scores are ordered. Possible values are: -
* "LARGER_IS_BETTER" - Larger values are better; scores are sorted
* in descending order. - "SMALLER_IS_BETTER" - Smaller values are
* better; scores are sorted in ascending order.
*/
order: string;
}
/**
* This is a JSON template for the Leaderboard Entry resource.
*/
export interface Schema$LeaderboardEntry {
/**
* The localized string for the numerical value of this score.
*/
formattedScore: string;
/**
* The localized string for the rank of this score for this leaderboard.
*/
formattedScoreRank: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#leaderboardEntry.
*/
kind: string;
/**
* The player who holds this score.
*/
player: Schema$Player;
/**
* The rank of this score for this leaderboard.
*/
scoreRank: string;
/**
* Additional information about the score. Values must contain no more than 64
* URI-safe characters as defined by section 2.3 of RFC 3986.
*/
scoreTag: string;
/**
* The numerical value of this score.
*/
scoreValue: string;
/**
* The time span of this high score. Possible values are: -
* "ALL_TIME" - The score is an all-time high score. -
* "WEEKLY" - The score is a weekly high score. - "DAILY"
* - The score is a daily high score.
*/
timeSpan: string;
/**
* The timestamp at which this score was recorded, in milliseconds since the
* epoch in UTC.
*/
writeTimestampMillis: string;
}
/**
* This is a JSON template for a list of leaderboard objects.
*/
export interface Schema$LeaderboardListResponse {
/**
* The leaderboards.
*/
items: Schema$Leaderboard[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#leaderboardListResponse.
*/
kind: string;
/**
* Token corresponding to the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for a score rank in a leaderboard.
*/
export interface Schema$LeaderboardScoreRank {
/**
* The number of scores in the leaderboard as a string.
*/
formattedNumScores: string;
/**
* The rank in the leaderboard as a string.
*/
formattedRank: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#leaderboardScoreRank.
*/
kind: string;
/**
* The number of scores in the leaderboard.
*/
numScores: string;
/**
* The rank in the leaderboard.
*/
rank: string;
}
/**
* This is a JSON template for a ListScores response.
*/
export interface Schema$LeaderboardScores {
/**
* The scores in the leaderboard.
*/
items: Schema$LeaderboardEntry[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#leaderboardScores.
*/
kind: string;
/**
* The pagination token for the next page of results.
*/
nextPageToken: string;
/**
* The total number of scores in the leaderboard.
*/
numScores: string;
/**
* The score of the requesting player on the leaderboard. The player's
* score may appear both here and in the list of scores above. If you are
* viewing a public leaderboard and the player is not sharing their gameplay
* information publicly, the scoreRank and formattedScoreRank values will not
* be present.
*/
playerScore: Schema$LeaderboardEntry;
/**
* The pagination token for the previous page of results.
*/
prevPageToken: string;
}
/**
* This is a JSON template for the metagame config resource
*/
export interface Schema$MetagameConfig {
/**
* Current version of the metagame configuration data. When this data is
* updated, the version number will be increased by one.
*/
currentVersion: number;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#metagameConfig.
*/
kind: string;
/**
* The list of player levels.
*/
playerLevels: Schema$PlayerLevel[];
}
/**
* This is a JSON template for network diagnostics reported for a client.
*/
export interface Schema$NetworkDiagnostics {
/**
* The Android network subtype.
*/
androidNetworkSubtype: number;
/**
* The Android network type.
*/
androidNetworkType: number;
/**
* iOS network type as defined in Reachability.h.
*/
iosNetworkType: number;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#networkDiagnostics.
*/
kind: string;
/**
* The MCC+MNC code for the client's network connection. On Android:
* http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperator()
* On iOS, see:
* https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html
*/
networkOperatorCode: string;
/**
* The name of the carrier of the client's network connection. On Android:
* http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperatorName()
* On iOS:
* https://developer.apple.com/library/ios/documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carrierName
*/
networkOperatorName: string;
/**
* The amount of time in milliseconds it took for the client to establish a
* connection with the XMPP server.
*/
registrationLatencyMillis: number;
}
/**
* This is a JSON template for a result for a match participant.
*/
export interface Schema$ParticipantResult {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#participantResult.
*/
kind: string;
/**
* The ID of the participant.
*/
participantId: string;
/**
* The placement or ranking of the participant in the match results; a number
* from one to the number of participants in the match. Multiple participants
* may have the same placing value in case of a type.
*/
placing: number;
/**
* The result of the participant for this match. Possible values are: -
* "MATCH_RESULT_WIN" - The participant won the match. -
* "MATCH_RESULT_LOSS" - The participant lost the match. -
* "MATCH_RESULT_TIE" - The participant tied the match. -
* "MATCH_RESULT_NONE" - There was no winner for the match (nobody
* wins or loses this kind of game.) - "MATCH_RESULT_DISCONNECT" -
* The participant disconnected / left during the match. -
* "MATCH_RESULT_DISAGREED" - Different clients reported different
* results for this participant.
*/
result: string;
}
/**
* This is a JSON template for peer channel diagnostics.
*/
export interface Schema$PeerChannelDiagnostics {
/**
* Number of bytes received.
*/
bytesReceived: Schema$AggregateStats;
/**
* Number of bytes sent.
*/
bytesSent: Schema$AggregateStats;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#peerChannelDiagnostics.
*/
kind: string;
/**
* Number of messages lost.
*/
numMessagesLost: number;
/**
* Number of messages received.
*/
numMessagesReceived: number;
/**
* Number of messages sent.
*/
numMessagesSent: number;
/**
* Number of send failures.
*/
numSendFailures: number;
/**
* Roundtrip latency stats in milliseconds.
*/
roundtripLatencyMillis: Schema$AggregateStats;
}
/**
* This is a JSON template for peer session diagnostics.
*/
export interface Schema$PeerSessionDiagnostics {
/**
* Connected time in milliseconds.
*/
connectedTimestampMillis: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#peerSessionDiagnostics.
*/
kind: string;
/**
* The participant ID of the peer.
*/
participantId: string;
/**
* Reliable channel diagnostics.
*/
reliableChannel: Schema$PeerChannelDiagnostics;
/**
* Unreliable channel diagnostics.
*/
unreliableChannel: Schema$PeerChannelDiagnostics;
}
/**
* This is a JSON template for metadata about a player playing a game with the
* currently authenticated user.
*/
export interface Schema$Played {
/**
* True if the player was auto-matched with the currently authenticated user.
*/
autoMatched: boolean;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#played.
*/
kind: string;
/**
* The last time the player played the game in milliseconds since the epoch in
* UTC.
*/
timeMillis: string;
}
/**
* This is a JSON template for a Player resource.
*/
export interface Schema$Player {
/**
* The base URL for the image that represents the player.
*/
avatarImageUrl: string;
/**
* The url to the landscape mode player banner image.
*/
bannerUrlLandscape: string;
/**
* The url to the portrait mode player banner image.
*/
bannerUrlPortrait: string;
/**
* The name to display for the player.
*/
displayName: string;
/**
* An object to represent Play Game experience information for the player.
*/
experienceInfo: Schema$PlayerExperienceInfo;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#player.
*/
kind: string;
/**
* Details about the last time this player played a multiplayer game with the
* currently authenticated player. Populated for PLAYED_WITH player collection
* members.
*/
lastPlayedWith: Schema$Played;
/**
* An object representation of the individual components of the player's
* name. For some players, these fields may not be present.
*/
name: any;
/**
* The player ID that was used for this player the first time they signed into
* the game in question. This is only populated for calls to player.get for
* the requesting player, only if the player ID has subsequently changed, and
* only to clients that support remapping player IDs.
*/
originalPlayerId: string;
/**
* The ID of the player.
*/
playerId: string;
/**
* The player's profile settings. Controls whether or not the player's
* profile is visible to other players.
*/
profileSettings: Schema$ProfileSettings;
/**
* The player's title rewarded for their game activities.
*/
title: string;
}
/**
* This is a JSON template for an achievement object.
*/
export interface Schema$PlayerAchievement {
/**
* The state of the achievement. Possible values are: - "HIDDEN" -
* Achievement is hidden. - "REVEALED" - Achievement is revealed.
* - "UNLOCKED" - Achievement is unlocked.
*/
achievementState: string;
/**
* The current steps for an incremental achievement.
*/
currentSteps: number;
/**
* 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.
*/
experiencePoints: string;
/**
* The current steps for an incremental achievement as a string.
*/
formattedCurrentStepsString: string;
/**
* The ID of the achievement.
*/
id: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerAchievement.
*/
kind: string;
/**
* The timestamp of the last modification to this achievement's state.
*/
lastUpdatedTimestamp: string;
}
/**
* This is a JSON template for a list of achievement objects.
*/
export interface Schema$PlayerAchievementListResponse {
/**
* The achievements.
*/
items: Schema$PlayerAchievement[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerAchievementListResponse.
*/
kind: string;
/**
* Token corresponding to the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for an event status resource.
*/
export interface Schema$PlayerEvent {
/**
* The ID of the event definition.
*/
definitionId: string;
/**
* The current number of times this event has occurred, as a string. The
* formatting of this string depends on the configuration of your event in the
* Play Games Developer Console.
*/
formattedNumEvents: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerEvent.
*/
kind: string;
/**
* The current number of times this event has occurred.
*/
numEvents: string;
/**
* The ID of the player.
*/
playerId: string;
}
/**
* This is a JSON template for a ListByPlayer response.
*/
export interface Schema$PlayerEventListResponse {
/**
* The player events.
*/
items: Schema$PlayerEvent[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerEventListResponse.
*/
kind: string;
/**
* The pagination token for the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for 1P/3P metadata about the player's experience.
*/
export interface Schema$PlayerExperienceInfo {
/**
* The current number of experience points for the player.
*/
currentExperiencePoints: string;
/**
* The current level of the player.
*/
currentLevel: Schema$PlayerLevel;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerExperienceInfo.
*/
kind: string;
/**
* The timestamp when the player was leveled up, in millis since Unix epoch
* UTC.
*/
lastLevelUpTimestampMillis: string;
/**
* The next level of the player. If the current level is the maximum level,
* this should be same as the current level.
*/
nextLevel: Schema$PlayerLevel;
}
/**
* This is a JSON template for a player leaderboard score object.
*/
export interface Schema$PlayerLeaderboardScore {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerLeaderboardScore.
*/
kind: string;
/**
* The ID of the leaderboard this score is in.
*/
leaderboard_id: string;
/**
* The public rank of the score in this leaderboard. This object will not be
* present if the user is not sharing their scores publicly.
*/
publicRank: Schema$LeaderboardScoreRank;
/**
* The formatted value of this score.
*/
scoreString: string;
/**
* Additional information about the score. Values must contain no more than 64
* URI-safe characters as defined by section 2.3 of RFC 3986.
*/
scoreTag: string;
/**
* The numerical value of this score.
*/
scoreValue: string;
/**
* The social rank of the score in this leaderboard.
*/
socialRank: Schema$LeaderboardScoreRank;
/**
* The time span of this score. Possible values are: - "ALL_TIME"
* - The score is an all-time score. - "WEEKLY" - The score is a
* weekly score. - "DAILY" - The score is a daily score.
*/
timeSpan: string;
/**
* The timestamp at which this score was recorded, in milliseconds since the
* epoch in UTC.
*/
writeTimestamp: string;
}
/**
* This is a JSON template for a list of player leaderboard scores.
*/
export interface Schema$PlayerLeaderboardScoreListResponse {
/**
* The leaderboard scores.
*/
items: Schema$PlayerLeaderboardScore[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerLeaderboardScoreListResponse.
*/
kind: string;
/**
* The pagination token for the next page of results.
*/
nextPageToken: string;
/**
* The Player resources for the owner of this score.
*/
player: Schema$Player;
}
/**
* This is a JSON template for 1P/3P metadata about a user's level.
*/
export interface Schema$PlayerLevel {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerLevel.
*/
kind: string;
/**
* The level for the user.
*/
level: number;
/**
* The maximum experience points for this level.
*/
maxExperiencePoints: string;
/**
* The minimum experience points for this level.
*/
minExperiencePoints: string;
}
/**
* This is a JSON template for a third party player list response.
*/
export interface Schema$PlayerListResponse {
/**
* The players.
*/
items: Schema$Player[];
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerListResponse.
*/
kind: string;
/**
* Token corresponding to the next page of results.
*/
nextPageToken: string;
}
/**
* This is a JSON template for a player score.
*/
export interface Schema$PlayerScore {
/**
* The formatted score for this player score.
*/
formattedScore: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerScore.
*/
kind: string;
/**
* The numerical value for this player score.
*/
score: string;
/**
* Additional information about this score. Values will contain no more than
* 64 URI-safe characters as defined by section 2.3 of RFC 3986.
*/
scoreTag: string;
/**
* The time span for this player score. Possible values are: -
* "ALL_TIME" - The score is an all-time score. -
* "WEEKLY" - The score is a weekly score. - "DAILY" -
* The score is a daily score.
*/
timeSpan: string;
}
/**
* This is a JSON template for a list of score submission statuses.
*/
export interface Schema$PlayerScoreListResponse {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerScoreListResponse.
*/
kind: string;
/**
* The score submissions statuses.
*/
submittedScores: Schema$PlayerScoreResponse[];
}
/**
* This is a JSON template for a list of leaderboard entry resources.
*/
export interface Schema$PlayerScoreResponse {
/**
* The time spans where the submitted score is better than the existing score
* for that time span. Possible values are: - "ALL_TIME" - The
* score is an all-time score. - "WEEKLY" - The score is a weekly
* score. - "DAILY" - The score is a daily score.
*/
beatenScoreTimeSpans: string[];
/**
* The formatted value of the submitted score.
*/
formattedScore: string;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerScoreResponse.
*/
kind: string;
/**
* The leaderboard ID that this score was submitted to.
*/
leaderboardId: string;
/**
* Additional information about this score. Values will contain no more than
* 64 URI-safe characters as defined by section 2.3 of RFC 3986.
*/
scoreTag: string;
/**
* The scores in time spans that have not been beaten. As an example, the
* submitted score may be better than the player's DAILY score, but not
* better than the player's scores for the WEEKLY or ALL_TIME time spans.
*/
unbeatenScores: Schema$PlayerScore[];
}
/**
* This is a JSON template for a list of score submission requests
*/
export interface Schema$PlayerScoreSubmissionList {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#playerScoreSubmissionList.
*/
kind: string;
/**
* The score submissions.
*/
scores: Schema$ScoreSubmission[];
}
/**
* This is a JSON template for profile settings
*/
export interface Schema$ProfileSettings {
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#profileSettings.
*/
kind: string;
/**
* The player's current profile visibility. This field is visible to both
* 1P and 3P APIs.
*/
profileVisible: boolean;
}
/**
* This is a JSON template for a push token resource.
*/
export interface Schema$PushToken {
/**
* The revision of the client SDK used by your application, in the same format
* that's used by revisions.check. Used to send backward compatible
* messages. Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of
* PLATFORM_TYPE are: - IOS - Push token is for iOS
*/
clientRevision: string;
/**
* Unique identifier for this push token.
*/
id: Schema$PushTokenId;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#pushToken.
*/
kind: string;
/**
* The preferred language for notifications that are sent using this token.
*/
language: string;
}
/**
* This is a JSON template for a push token ID resource.
*/
export interface Schema$PushTokenId {
/**
* A push token ID for iOS devices.
*/
ios: any;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#pushTokenId.
*/
kind: string;
}
/**
* This is a JSON template for a Quest resource.
*/
export interface Schema$Quest {
/**
* 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.
*/
acceptedTimestampMillis: string;
/**
* The ID of the application this quest is part of.
*/
applicationId: string;
/**
* The banner image URL for the quest.
*/
bannerUrl: string;
/**
* The description of the quest.
*/
description: string;
/**
* The timestamp at which the quest ceases to be active in milliseconds since
* the epoch in UTC.
*/
endTimestampMillis: string;
/**
* The icon image URL for the quest.
*/
iconUrl: string;
/**
* The ID of the quest.
*/
id: string;
/**
* Indicates whether the banner image being returned is a default image, or is
* game-provided.
*/
isDefaultBannerUrl: boolean;
/**
* Indicates whether the icon image being returned is a default image, or is
* game-provided.
*/
isDefaultIconUrl: boolean;
/**
* Uniquely identifies the type of this resource. Value is always the fixed
* string games#quest.
*/
kind: string;
/**
* 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.
*/
lastUpdatedTimestampMillis: string;
/**
* The quest milestones.
*/
milestones: Schema$QuestMilestone[];
/**
* The name of the quest.
*/
name: string;
/