Skip to content

Commit

Permalink
feat(games): update the API
Browse files Browse the repository at this point in the history
#### games:v1

The following keys were added:
- resources.recall.methods.gamesPlayerTokens.description
- resources.recall.methods.gamesPlayerTokens.flatPath
- resources.recall.methods.gamesPlayerTokens.httpMethod
- resources.recall.methods.gamesPlayerTokens.id
- resources.recall.methods.gamesPlayerTokens.parameterOrder
- resources.recall.methods.gamesPlayerTokens.parameters.applicationIds.description
- resources.recall.methods.gamesPlayerTokens.parameters.applicationIds.location
- resources.recall.methods.gamesPlayerTokens.parameters.applicationIds.repeated
- resources.recall.methods.gamesPlayerTokens.parameters.applicationIds.type
- resources.recall.methods.gamesPlayerTokens.parameters.sessionId.description
- resources.recall.methods.gamesPlayerTokens.parameters.sessionId.location
- resources.recall.methods.gamesPlayerTokens.parameters.sessionId.required
- resources.recall.methods.gamesPlayerTokens.parameters.sessionId.type
- resources.recall.methods.gamesPlayerTokens.path
- resources.recall.methods.gamesPlayerTokens.response.$ref
- resources.recall.methods.gamesPlayerTokens.scopes
- schemas.GamePlayerToken.description
- schemas.GamePlayerToken.id
- schemas.GamePlayerToken.properties.applicationId.description
- schemas.GamePlayerToken.properties.applicationId.type
- schemas.GamePlayerToken.properties.token.description
- schemas.GamePlayerToken.properties.token.items.$ref
- schemas.GamePlayerToken.properties.token.type
- schemas.GamePlayerToken.type
- schemas.RetrieveGamesPlayerTokensResponse.description
- schemas.RetrieveGamesPlayerTokensResponse.id
- schemas.RetrieveGamesPlayerTokensResponse.properties.applicationRecallTokens.description
- schemas.RetrieveGamesPlayerTokensResponse.properties.applicationRecallTokens.items.$ref
- schemas.RetrieveGamesPlayerTokensResponse.properties.applicationRecallTokens.type
- schemas.RetrieveGamesPlayerTokensResponse.type

The following keys were changed:
- resources.recall.methods.lastTokenFromAllDeveloperGames.description
- resources.recall.methods.retrieveTokens.description
  • Loading branch information
yoshi-automation authored and sofisl committed Jun 6, 2024
1 parent e928bdf commit 1d0f489
Show file tree
Hide file tree
Showing 2 changed files with 196 additions and 5 deletions.
68 changes: 65 additions & 3 deletions discovery/games-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,38 @@
},
"recall": {
"methods": {
"gamesPlayerTokens": {
"description": "Retrieve the Recall tokens from all requested games that is associated with the PGS Player encoded in the provided recall session id. The API is only available for users that have an active PGS Player profile.",
"flatPath": "games/v1/recall/gamesPlayerTokens/{sessionId}",
"httpMethod": "GET",
"id": "games.recall.gamesPlayerTokens",
"parameterOrder": [
"sessionId"
],
"parameters": {
"applicationIds": {
"description": "Required. The application IDs from the Google Play developer console for the games to return scoped ids for.",
"location": "query",
"repeated": true,
"type": "string"
},
"sessionId": {
"description": "Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "games/v1/recall/gamesPlayerTokens/{sessionId}",
"response": {
"$ref": "RetrieveGamesPlayerTokensResponse"
},
"scopes": [
"https://www.googleapis.com/auth/androidpublisher"
]
},
"lastTokenFromAllDeveloperGames": {
"description": "Retrieve the last Recall token from all developer games that is associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.",
"description": "Retrieve the last Recall token from all developer games that is associated with the PGS Player encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.",
"flatPath": "games/v1/recall/developerGamesLastPlayerToken/{sessionId}",
"httpMethod": "GET",
"id": "games.recall.lastTokenFromAllDeveloperGames",
Expand Down Expand Up @@ -883,7 +913,7 @@
]
},
"retrieveTokens": {
"description": "Retrieve all Recall tokens associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.",
"description": "Retrieve all Recall tokens associated with the PGS Player encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.",
"flatPath": "games/v1/recall/tokens/{sessionId}",
"httpMethod": "GET",
"id": "games.recall.retrieveTokens",
Expand Down Expand Up @@ -1378,7 +1408,7 @@
}
}
},
"revision": "20240424",
"revision": "20240529",
"rootUrl": "https://games.googleapis.com/",
"schemas": {
"AchievementDefinition": {
Expand Down Expand Up @@ -2132,6 +2162,24 @@
},
"type": "object"
},
"GamePlayerToken": {
"description": "Recall tokens for a game.",
"id": "GamePlayerToken",
"properties": {
"applicationId": {
"description": "The application that this player identifier is for.",
"type": "string"
},
"token": {
"description": "Recall token data.",
"items": {
"$ref": "RecallToken"
},
"type": "array"
}
},
"type": "object"
},
"GamesAchievementIncrement": {
"description": "The payload to request to increment an achievement.",
"id": "GamesAchievementIncrement",
Expand Down Expand Up @@ -3179,6 +3227,20 @@
},
"type": "object"
},
"RetrieveGamesPlayerTokensResponse": {
"description": "A list of recall token data returned from the RetrieveGamesPlayerTokens RPC",
"id": "RetrieveGamesPlayerTokensResponse",
"properties": {
"applicationRecallTokens": {
"description": "The requested applications along with the recall tokens for the player. If the player does not have recall tokens for an application, that application is not included in the response.",
"items": {
"$ref": "GamePlayerToken"
},
"type": "array"
}
},
"type": "object"
},
"RetrievePlayerTokensResponse": {
"description": "Response for the RetrievePlayerTokens RPC",
"id": "RetrievePlayerTokensResponse",
Expand Down
133 changes: 131 additions & 2 deletions src/apis/games/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,19 @@ export namespace games_v1 {
*/
playerEvents?: Schema$PlayerEvent[];
}
/**
* Recall tokens for a game.
*/
export interface Schema$GamePlayerToken {
/**
* The application that this player identifier is for.
*/
applicationId?: string | null;
/**
* Recall token data.
*/
token?: Schema$RecallToken[];
}
/**
* The payload to request to increment an achievement.
*/
Expand Down Expand Up @@ -1495,6 +1508,15 @@ export namespace games_v1 {
*/
token?: Schema$RecallToken;
}
/**
* A list of recall token data returned from the RetrieveGamesPlayerTokens RPC
*/
export interface Schema$RetrieveGamesPlayerTokensResponse {
/**
* The requested applications along with the recall tokens for the player. If the player does not have recall tokens for an application, that application is not included in the response.
*/
applicationRecallTokens?: Schema$GamePlayerToken[];
}
/**
* Response for the RetrievePlayerTokens RPC
*/
Expand Down Expand Up @@ -4065,7 +4087,103 @@ export namespace games_v1 {
}

/**
* Retrieve the last Recall token from all developer games that is associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.
* Retrieve the Recall tokens from all requested games that is associated with the PGS Player encoded in the provided recall session id. The API is only available for users that have an active PGS Player profile.
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
gamesPlayerTokens(
params: Params$Resource$Recall$Gamesplayertokens,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
gamesPlayerTokens(
params?: Params$Resource$Recall$Gamesplayertokens,
options?: MethodOptions
): GaxiosPromise<Schema$RetrieveGamesPlayerTokensResponse>;
gamesPlayerTokens(
params: Params$Resource$Recall$Gamesplayertokens,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
gamesPlayerTokens(
params: Params$Resource$Recall$Gamesplayertokens,
options:
| MethodOptions
| BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>,
callback: BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>
): void;
gamesPlayerTokens(
params: Params$Resource$Recall$Gamesplayertokens,
callback: BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>
): void;
gamesPlayerTokens(
callback: BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>
): void;
gamesPlayerTokens(
paramsOrCallback?:
| Params$Resource$Recall$Gamesplayertokens
| BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$RetrieveGamesPlayerTokensResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$RetrieveGamesPlayerTokensResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Recall$Gamesplayertokens;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Recall$Gamesplayertokens;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl = options.rootUrl || 'https://games.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (
rootUrl + '/games/v1/recall/gamesPlayerTokens/{sessionId}'
).replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
},
options
),
params,
requiredParams: ['sessionId'],
pathParams: ['sessionId'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$RetrieveGamesPlayerTokensResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$RetrieveGamesPlayerTokensResponse>(
parameters
);
}
}

/**
* Retrieve the last Recall token from all developer games that is associated with the PGS Player encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
Expand Down Expand Up @@ -4350,7 +4468,7 @@ export namespace games_v1 {
}

/**
* Retrieve all Recall tokens associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.
* Retrieve all Recall tokens associated with the PGS Player encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
Expand Down Expand Up @@ -4542,6 +4660,17 @@ export namespace games_v1 {
}
}

export interface Params$Resource$Recall$Gamesplayertokens
extends StandardParameters {
/**
* Required. The application IDs from the Google Play developer console for the games to return scoped ids for.
*/
applicationIds?: string[];
/**
* Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application.
*/
sessionId?: string;
}
export interface Params$Resource$Recall$Lasttokenfromalldevelopergames
extends StandardParameters {
/**
Expand Down

0 comments on commit 1d0f489

Please sign in to comment.