0.0.20241022 • Published 10 months ago

@maxim_mazurok/gapi.client.games_configuration-v1configuration v0.0.20241022

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

TypeScript typings for Google Play Game Services Publishing API v1configuration

The Google Play Game Services Publishing API allows developers to configure their games in Game Services. For detailed description please check documentation.

Installing

Install typings for Google Play Game Services Publishing API:

npm install @types/gapi.client.games_configuration-v1configuration --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://gamesconfiguration.googleapis.com/$discovery/rest?version=v1configuration',
  () => {
    // now we can use:
    // gapi.client.gamesConfiguration
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('gamesConfiguration', 'v1configuration', () => {
  // now we can use:
  // gapi.client.gamesConfiguration
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // View and manage your Google Play Developer account
    'https://www.googleapis.com/auth/androidpublisher',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Google Play Game Services Publishing API resources:

/*
Delete the achievement configuration with the given ID.
*/
await gapi.client.gamesConfiguration.achievementConfigurations.delete({
  achievementId: 'achievementId',
});

/*
Retrieves the metadata of the achievement configuration with the given ID.
*/
await gapi.client.gamesConfiguration.achievementConfigurations.get({
  achievementId: 'achievementId',
});

/*
Insert a new achievement configuration in this application.
*/
await gapi.client.gamesConfiguration.achievementConfigurations.insert({
  applicationId: 'applicationId',
});

/*
Returns a list of the achievement configurations in this application.
*/
await gapi.client.gamesConfiguration.achievementConfigurations.list({
  applicationId: 'applicationId',
});

/*
Update the metadata of the achievement configuration with the given ID.
*/
await gapi.client.gamesConfiguration.achievementConfigurations.update({
  achievementId: 'achievementId',
});

/*
Delete the leaderboard configuration with the given ID.
*/
await gapi.client.gamesConfiguration.leaderboardConfigurations.delete({
  leaderboardId: 'leaderboardId',
});

/*
Retrieves the metadata of the leaderboard configuration with the given ID.
*/
await gapi.client.gamesConfiguration.leaderboardConfigurations.get({
  leaderboardId: 'leaderboardId',
});

/*
Insert a new leaderboard configuration in this application.
*/
await gapi.client.gamesConfiguration.leaderboardConfigurations.insert({
  applicationId: 'applicationId',
});

/*
Returns a list of the leaderboard configurations in this application.
*/
await gapi.client.gamesConfiguration.leaderboardConfigurations.list({
  applicationId: 'applicationId',
});

/*
Update the metadata of the leaderboard configuration with the given ID.
*/
await gapi.client.gamesConfiguration.leaderboardConfigurations.update({
  leaderboardId: 'leaderboardId',
});
0.0.20241022

10 months ago

0.0.20241016

10 months ago

0.0.20241009

10 months ago

0.0.20241002

11 months ago

0.0.20240918

11 months ago

0.0.20240916

11 months ago

0.0.20240905

12 months ago

0.0.20240729

1 year ago

0.0.20240605

1 year ago

0.0.20240722

1 year ago

0.0.20240618

1 year ago

0.0.20240731

1 year ago

0.0.20240808

1 year ago

0.0.20240809

1 year ago

0.0.20240529

1 year ago

0.0.20240814

1 year ago

0.0.20240701

1 year ago

0.0.20240717

1 year ago

0.0.20240718

1 year ago

0.0.20240715

1 year ago

0.0.20240515

1 year ago

0.0.20240508

1 year ago

0.0.20240424

1 year ago

0.0.20240416

1 year ago

0.0.20240410

1 year ago

0.0.20240408

1 year ago

0.0.20240328

1 year ago

0.0.20240402

1 year ago

0.0.20240320

1 year ago

0.0.20240318

1 year ago

0.0.20240312

1 year ago

0.0.20240306

1 year ago

0.0.20240228

1 year ago

0.0.20240227

1 year ago

0.0.20240220

2 years ago

0.0.20240213

2 years ago

0.0.20240207

2 years ago

0.0.20240129

2 years ago

0.0.20240123

2 years ago

0.0.20240114

2 years ago

0.0.20240110

2 years ago

0.0.20231212

2 years ago

0.0.20231129

2 years ago

0.0.20231107

2 years ago

0.0.20231115

2 years ago

0.0.20230920

2 years ago

0.0.20231017

2 years ago

0.0.20230724

2 years ago

0.0.20231102

2 years ago

0.0.20231025

2 years ago

0.0.20231024

2 years ago

0.0.20231127

2 years ago

0.0.20230712

2 years ago

0.0.20230830

2 years ago

0.0.20230710

2 years ago

0.0.20230906

2 years ago

0.0.20230708

2 years ago

0.0.20230822

2 years ago

0.0.20230705

2 years ago

0.0.20230703

2 years ago

0.0.20231003

2 years ago

0.0.20230623

2 years ago

0.0.20230614

2 years ago

0.0.20230608

2 years ago

0.0.20230525

2 years ago

0.0.20230523

2 years ago

0.0.20230531

2 years ago

0.0.20230530

2 years ago

0.0.20230512

2 years ago

0.0.20230516

2 years ago

0.0.20230426

2 years ago

0.0.20230621

2 years ago

0.0.20230504

2 years ago

0.0.20230505

2 years ago

0.0.20230315

2 years ago

0.0.20230412

2 years ago

0.0.20230322

2 years ago

0.0.20230420

2 years ago

0.0.20230222

2 years ago

0.0.20230405

2 years ago

0.0.20230328

2 years ago

0.0.20230329

2 years ago

0.0.20230310

2 years ago

0.0.20230215

3 years ago

0.0.20230201

3 years ago

0.0.20230125

3 years ago

0.0.20230221

3 years ago

0.0.20230210

3 years ago

0.0.20221213

3 years ago

0.0.20230120

3 years ago

0.0.20221109

3 years ago

0.0.20221207

3 years ago

0.0.20221206

3 years ago

0.0.20221202

3 years ago

0.0.20221201

3 years ago

0.0.20221124

3 years ago

0.0.20221102

3 years ago

0.0.20230112

3 years ago

0.0.20221117

3 years ago

0.0.20221005

3 years ago

0.0.20221026

3 years ago

0.0.20221004

3 years ago

0.0.20220928

3 years ago

0.0.20221019

3 years ago

0.0.20220909

3 years ago

0.0.20220831

3 years ago

0.0.20220921

3 years ago

0.0.20220824

3 years ago

0.0.20220914

3 years ago

0.0.20220810

3 years ago

0.0.20220803

3 years ago