1.0.20220803 • Published 2 years ago

@maxim_mazurok/gapi.client.gamesconfiguration v1.0.20220803

Weekly downloads
86
License
MIT
Repository
github
Last release
2 years 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.gamesconfiguration@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('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",  });

/*
Uploads an image for a resource with the given ID and image type.
*/
await gapi.client.gamesconfiguration.imageConfigurations.upload({ imageType: "imageType", resourceId: "resourceId",  });

/*
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",  });
1.0.20220629

2 years ago

1.0.20220713

2 years ago

1.0.20220720

2 years ago

1.0.20220803

2 years ago

1.0.20220726

2 years ago

1.0.20220609

2 years ago

1.0.20220504

2 years ago

1.0.20220428

2 years ago

1.0.20220601

2 years ago

1.0.20220525

2 years ago

1.0.20220420

2 years ago

1.0.20220319

2 years ago

1.0.20220324

2 years ago

1.0.20220407

2 years ago

1.0.20220330

2 years ago

1.0.20220303

2 years ago

1.0.20220310

2 years ago

1.0.20220217

2 years ago

1.0.20220119

2 years ago

1.0.20220203

2 years ago

1.0.20220127

2 years ago

1.0.20220210

2 years ago

1.0.20211111

3 years ago

1.0.20211202

2 years ago

1.0.20211125

2 years ago

1.0.20211213

2 years ago

1.0.20211103

3 years ago

1.0.20211028

3 years ago

1.0.20211006

3 years ago

1.0.20211014

3 years ago

1.0.20210929

3 years ago

1.0.20210922

3 years ago

1.0.20210916

3 years ago

1.0.20210909

3 years ago

1.0.20210902

3 years ago

1.0.20210819

3 years ago

1.0.20210825

3 years ago

1.0.20210811

3 years ago

1.0.20210805

3 years ago

1.0.20210729

3 years ago

1.0.20210721

3 years ago

1.0.20210719

3 years ago

1.0.20210715

3 years ago

1.0.20210713

3 years ago

1.0.20210630

3 years ago

1.0.20210708

3 years ago

1.0.20210624

3 years ago

1.0.20210614

3 years ago

1.0.20210611

3 years ago

1.0.20210608

3 years ago

1.0.20210605

3 years ago

1.0.20210602

3 years ago

1.0.20210526

3 years ago

1.0.20210525

3 years ago

1.0.20210513

3 years ago

1.0.20210506

3 years ago

1.0.20210429

3 years ago

1.0.20210422

3 years ago

1.0.20210415

3 years ago

1.0.20210408

3 years ago

1.0.20210401

3 years ago

1.0.20210325

3 years ago

1.0.20210318

3 years ago

1.0.20210311

3 years ago

1.0.20210304

3 years ago

1.0.20210225

3 years ago

1.0.20210218

3 years ago

1.0.20210217

3 years ago

1.0.20210211

3 years ago

1.0.20210204

3 years ago

1.0.20210128

3 years ago

1.0.20210121

3 years ago

1.0.20210114

3 years ago

1.0.20201210

3 years ago

1.0.20201203

3 years ago

1.0.20201125

3 years ago

1.0.20201112

4 years ago