Skip to content

Commit ffe3fdc

Browse files
yoshi-automationsofisl
authored andcommitted
feat(games): update the API
#### games:v1 The following keys were added: - resources.players.methods.getMultipleApplicationPlayerIds.description - resources.players.methods.getMultipleApplicationPlayerIds.flatPath - resources.players.methods.getMultipleApplicationPlayerIds.httpMethod - resources.players.methods.getMultipleApplicationPlayerIds.id - resources.players.methods.getMultipleApplicationPlayerIds.parameterOrder - resources.players.methods.getMultipleApplicationPlayerIds.parameters.applicationIds.description - resources.players.methods.getMultipleApplicationPlayerIds.parameters.applicationIds.location - resources.players.methods.getMultipleApplicationPlayerIds.parameters.applicationIds.repeated - resources.players.methods.getMultipleApplicationPlayerIds.parameters.applicationIds.type - resources.players.methods.getMultipleApplicationPlayerIds.path - resources.players.methods.getMultipleApplicationPlayerIds.response.$ref - resources.players.methods.getMultipleApplicationPlayerIds.scopes - schemas.ApplicationPlayerId.description - schemas.ApplicationPlayerId.id - schemas.ApplicationPlayerId.properties.applicationId.description - schemas.ApplicationPlayerId.properties.applicationId.type - schemas.ApplicationPlayerId.properties.playerId.description - schemas.ApplicationPlayerId.properties.playerId.type - schemas.ApplicationPlayerId.type - schemas.GetMultipleApplicationPlayerIdsResponse.description - schemas.GetMultipleApplicationPlayerIdsResponse.id - schemas.GetMultipleApplicationPlayerIdsResponse.properties.playerIds.description - schemas.GetMultipleApplicationPlayerIdsResponse.properties.playerIds.items.$ref - schemas.GetMultipleApplicationPlayerIdsResponse.properties.playerIds.readOnly - schemas.GetMultipleApplicationPlayerIdsResponse.properties.playerIds.type - schemas.GetMultipleApplicationPlayerIdsResponse.type
1 parent 114895c commit ffe3fdc

File tree

2 files changed

+219
-1
lines changed

2 files changed

+219
-1
lines changed

discovery/games-v1.json

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,28 @@
729729
"https://www.googleapis.com/auth/games"
730730
]
731731
},
732+
"getMultipleApplicationPlayerIds": {
733+
"description": "Get the application player ids for the currently authenticated player across all requested games by the same developer as the calling application. This will only return ids for players that actually have an id (scoped or otherwise) with that game.",
734+
"flatPath": "games/v1/players/me/multipleApplicationPlayerIds",
735+
"httpMethod": "GET",
736+
"id": "games.players.getMultipleApplicationPlayerIds",
737+
"parameterOrder": [],
738+
"parameters": {
739+
"applicationIds": {
740+
"description": "Required. The application IDs from the Google Play developer console for the games to return scoped ids for.",
741+
"location": "query",
742+
"repeated": true,
743+
"type": "string"
744+
}
745+
},
746+
"path": "games/v1/players/me/multipleApplicationPlayerIds",
747+
"response": {
748+
"$ref": "GetMultipleApplicationPlayerIdsResponse"
749+
},
750+
"scopes": [
751+
"https://www.googleapis.com/auth/games"
752+
]
753+
},
732754
"getScopedPlayerIds": {
733755
"description": "Retrieves scoped player identifiers for currently authenticated user.",
734756
"flatPath": "games/v1/players/me/scopedIds",
@@ -1244,7 +1266,7 @@
12441266
}
12451267
}
12461268
},
1247-
"revision": "20220609",
1269+
"revision": "20230310",
12481270
"rootUrl": "https://games.googleapis.com/",
12491271
"schemas": {
12501272
"AchievementDefinition": {
@@ -1651,6 +1673,21 @@
16511673
},
16521674
"type": "object"
16531675
},
1676+
"ApplicationPlayerId": {
1677+
"description": "Primary scoped player identifier for an application.",
1678+
"id": "ApplicationPlayerId",
1679+
"properties": {
1680+
"applicationId": {
1681+
"description": "The application that this player identifier is for.",
1682+
"type": "string"
1683+
},
1684+
"playerId": {
1685+
"description": "The player identifier for the application.",
1686+
"type": "string"
1687+
}
1688+
},
1689+
"type": "object"
1690+
},
16541691
"ApplicationVerifyResponse": {
16551692
"description": "A third party application verification response resource.",
16561693
"id": "ApplicationVerifyResponse",
@@ -2038,6 +2075,21 @@
20382075
},
20392076
"type": "object"
20402077
},
2078+
"GetMultipleApplicationPlayerIdsResponse": {
2079+
"description": "Response message for GetMultipleApplicationPlayerIds rpc.",
2080+
"id": "GetMultipleApplicationPlayerIdsResponse",
2081+
"properties": {
2082+
"playerIds": {
2083+
"description": "Output only. The requested applications along with the scoped ids for tha player, if that player has an id for the application. If not, the application is not included in the response.",
2084+
"items": {
2085+
"$ref": "ApplicationPlayerId"
2086+
},
2087+
"readOnly": true,
2088+
"type": "array"
2089+
}
2090+
},
2091+
"type": "object"
2092+
},
20412093
"ImageAsset": {
20422094
"description": "An image asset object.",
20432095
"id": "ImageAsset",

src/apis/games/v1.ts

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,19 @@ export namespace games_v1 {
434434
*/
435435
secondary?: string | null;
436436
}
437+
/**
438+
* Primary scoped player identifier for an application.
439+
*/
440+
export interface Schema$ApplicationPlayerId {
441+
/**
442+
* The application that this player identifier is for.
443+
*/
444+
applicationId?: string | null;
445+
/**
446+
* The player identifier for the application.
447+
*/
448+
playerId?: string | null;
449+
}
437450
/**
438451
* A third party application verification response resource.
439452
*/
@@ -718,6 +731,15 @@ export namespace games_v1 {
718731
*/
719732
steps?: number | null;
720733
}
734+
/**
735+
* Response message for GetMultipleApplicationPlayerIds rpc.
736+
*/
737+
export interface Schema$GetMultipleApplicationPlayerIdsResponse {
738+
/**
739+
* Output only. The requested applications along with the scoped ids for tha player, if that player has an id for the application. If not, the application is not included in the response.
740+
*/
741+
playerIds?: Schema$ApplicationPlayerId[];
742+
}
721743
/**
722744
* An image asset object.
723745
*/
@@ -4485,6 +4507,143 @@ export namespace games_v1 {
44854507
}
44864508
}
44874509

4510+
/**
4511+
* Get the application player ids for the currently authenticated player across all requested games by the same developer as the calling application. This will only return ids for players that actually have an id (scoped or otherwise) with that game.
4512+
* @example
4513+
* ```js
4514+
* // Before running the sample:
4515+
* // - Enable the API at:
4516+
* // https://console.developers.google.com/apis/api/games.googleapis.com
4517+
* // - Login into gcloud by running:
4518+
* // `$ gcloud auth application-default login`
4519+
* // - Install the npm module by running:
4520+
* // `$ npm install googleapis`
4521+
*
4522+
* const {google} = require('googleapis');
4523+
* const games = google.games('v1');
4524+
*
4525+
* async function main() {
4526+
* const auth = new google.auth.GoogleAuth({
4527+
* // Scopes can be specified either as an array or as a single, space-delimited string.
4528+
* scopes: ['https://www.googleapis.com/auth/games'],
4529+
* });
4530+
*
4531+
* // Acquire an auth client, and bind it to all future calls
4532+
* const authClient = await auth.getClient();
4533+
* google.options({auth: authClient});
4534+
*
4535+
* // Do the magic
4536+
* const res = await games.players.getMultipleApplicationPlayerIds({
4537+
* // Required. The application IDs from the Google Play developer console for the games to return scoped ids for.
4538+
* applicationIds: 'placeholder-value',
4539+
* });
4540+
* console.log(res.data);
4541+
*
4542+
* // Example response
4543+
* // {
4544+
* // "playerIds": []
4545+
* // }
4546+
* }
4547+
*
4548+
* main().catch(e => {
4549+
* console.error(e);
4550+
* throw e;
4551+
* });
4552+
*
4553+
* ```
4554+
*
4555+
* @param params - Parameters for request
4556+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4557+
* @param callback - Optional callback that handles the response.
4558+
* @returns A promise if used with async/await, or void if used with a callback.
4559+
*/
4560+
getMultipleApplicationPlayerIds(
4561+
params: Params$Resource$Players$Getmultipleapplicationplayerids,
4562+
options: StreamMethodOptions
4563+
): GaxiosPromise<Readable>;
4564+
getMultipleApplicationPlayerIds(
4565+
params?: Params$Resource$Players$Getmultipleapplicationplayerids,
4566+
options?: MethodOptions
4567+
): GaxiosPromise<Schema$GetMultipleApplicationPlayerIdsResponse>;
4568+
getMultipleApplicationPlayerIds(
4569+
params: Params$Resource$Players$Getmultipleapplicationplayerids,
4570+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
4571+
callback: BodyResponseCallback<Readable>
4572+
): void;
4573+
getMultipleApplicationPlayerIds(
4574+
params: Params$Resource$Players$Getmultipleapplicationplayerids,
4575+
options:
4576+
| MethodOptions
4577+
| BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>,
4578+
callback: BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>
4579+
): void;
4580+
getMultipleApplicationPlayerIds(
4581+
params: Params$Resource$Players$Getmultipleapplicationplayerids,
4582+
callback: BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>
4583+
): void;
4584+
getMultipleApplicationPlayerIds(
4585+
callback: BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>
4586+
): void;
4587+
getMultipleApplicationPlayerIds(
4588+
paramsOrCallback?:
4589+
| Params$Resource$Players$Getmultipleapplicationplayerids
4590+
| BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>
4591+
| BodyResponseCallback<Readable>,
4592+
optionsOrCallback?:
4593+
| MethodOptions
4594+
| StreamMethodOptions
4595+
| BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>
4596+
| BodyResponseCallback<Readable>,
4597+
callback?:
4598+
| BodyResponseCallback<Schema$GetMultipleApplicationPlayerIdsResponse>
4599+
| BodyResponseCallback<Readable>
4600+
):
4601+
| void
4602+
| GaxiosPromise<Schema$GetMultipleApplicationPlayerIdsResponse>
4603+
| GaxiosPromise<Readable> {
4604+
let params = (paramsOrCallback ||
4605+
{}) as Params$Resource$Players$Getmultipleapplicationplayerids;
4606+
let options = (optionsOrCallback || {}) as MethodOptions;
4607+
4608+
if (typeof paramsOrCallback === 'function') {
4609+
callback = paramsOrCallback;
4610+
params = {} as Params$Resource$Players$Getmultipleapplicationplayerids;
4611+
options = {};
4612+
}
4613+
4614+
if (typeof optionsOrCallback === 'function') {
4615+
callback = optionsOrCallback;
4616+
options = {};
4617+
}
4618+
4619+
const rootUrl = options.rootUrl || 'https://games.googleapis.com/';
4620+
const parameters = {
4621+
options: Object.assign(
4622+
{
4623+
url: (
4624+
rootUrl + '/games/v1/players/me/multipleApplicationPlayerIds'
4625+
).replace(/([^:]\/)\/+/g, '$1'),
4626+
method: 'GET',
4627+
},
4628+
options
4629+
),
4630+
params,
4631+
requiredParams: [],
4632+
pathParams: [],
4633+
context: this.context,
4634+
};
4635+
if (callback) {
4636+
createAPIRequest<Schema$GetMultipleApplicationPlayerIdsResponse>(
4637+
parameters,
4638+
callback as BodyResponseCallback<unknown>
4639+
);
4640+
} else {
4641+
return createAPIRequest<Schema$GetMultipleApplicationPlayerIdsResponse>(
4642+
parameters
4643+
);
4644+
}
4645+
}
4646+
44884647
/**
44894648
* Retrieves scoped player identifiers for currently authenticated user.
44904649
* @example
@@ -4767,6 +4926,13 @@ export namespace games_v1 {
47674926
*/
47684927
playerIdConsistencyToken?: string;
47694928
}
4929+
export interface Params$Resource$Players$Getmultipleapplicationplayerids
4930+
extends StandardParameters {
4931+
/**
4932+
* Required. The application IDs from the Google Play developer console for the games to return scoped ids for.
4933+
*/
4934+
applicationIds?: string[];
4935+
}
47704936
export interface Params$Resource$Players$Getscopedplayerids
47714937
extends StandardParameters {}
47724938
export interface Params$Resource$Players$List extends StandardParameters {

0 commit comments

Comments
 (0)