0.0.20240508 • Published 13 days ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
13 days 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.20240508

13 days ago

0.0.20240424

21 days ago

0.0.20240416

28 days ago

0.0.20240410

1 month ago

0.0.20240408

1 month ago

0.0.20240328

2 months ago

0.0.20240402

2 months ago

0.0.20240320

2 months ago

0.0.20240318

2 months ago

0.0.20240312

2 months ago

0.0.20240306

3 months ago

0.0.20240228

3 months ago

0.0.20240227

3 months ago

0.0.20240220

3 months ago

0.0.20240213

3 months ago

0.0.20240207

3 months ago

0.0.20240129

4 months ago

0.0.20240123

4 months ago

0.0.20240114

4 months ago

0.0.20240110

4 months ago

0.0.20231212

5 months ago

0.0.20231129

6 months ago

0.0.20231107

6 months ago

0.0.20231115

6 months ago

0.0.20230920

8 months ago

0.0.20231017

7 months ago

0.0.20230724

10 months ago

0.0.20231102

7 months ago

0.0.20231025

7 months ago

0.0.20231024

7 months ago

0.0.20231127

6 months ago

0.0.20230712

10 months ago

0.0.20230830

9 months ago

0.0.20230710

10 months ago

0.0.20230906

8 months ago

0.0.20230708

11 months ago

0.0.20230822

9 months ago

0.0.20230705

11 months ago

0.0.20230703

11 months ago

0.0.20231003

7 months ago

0.0.20230623

11 months ago

0.0.20230614

11 months ago

0.0.20230608

12 months ago

0.0.20230525

12 months ago

0.0.20230523

12 months ago

0.0.20230531

12 months ago

0.0.20230530

12 months ago

0.0.20230512

1 year ago

0.0.20230516

1 year ago

0.0.20230426

1 year ago

0.0.20230621

11 months ago

0.0.20230504

1 year ago

0.0.20230505

1 year ago

0.0.20230315

1 year ago

0.0.20230412

1 year ago

0.0.20230322

1 year ago

0.0.20230420

1 year ago

0.0.20230222

1 year ago

0.0.20230405

1 year ago

0.0.20230328

1 year ago

0.0.20230329

1 year ago

0.0.20230310

1 year ago

0.0.20230215

1 year ago

0.0.20230201

1 year ago

0.0.20230125

1 year ago

0.0.20230221

1 year ago

0.0.20230210

1 year ago

0.0.20221213

1 year ago

0.0.20230120

1 year ago

0.0.20221109

2 years ago

0.0.20221207

1 year ago

0.0.20221206

1 year ago

0.0.20221202

1 year ago

0.0.20221201

1 year ago

0.0.20221124

1 year ago

0.0.20221102

2 years ago

0.0.20230112

1 year ago

0.0.20221117

1 year ago

0.0.20221005

2 years ago

0.0.20221026

2 years ago

0.0.20221004

2 years ago

0.0.20220928

2 years ago

0.0.20221019

2 years ago

0.0.20220909

2 years ago

0.0.20220831

2 years ago

0.0.20220921

2 years ago

0.0.20220824

2 years ago

0.0.20220914

2 years ago

0.0.20220810

2 years ago

0.0.20220803

2 years ago