TypeScript typings for Google Play Android Developer API v3
Lets Android application developers access their Google Play accounts.
For detailed description please check documentation.
Installing
Install typings for Google Play Android Developer API:
npm install @types/gapi.client.androidpublisher@v3 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
});
Then load api client wrapper:
gapi.client.load('androidpublisher', 'v3', () => {
});
Don't forget to authenticate your client before sending any request to resources:
var client_id = '',
scope = [
'https://www.googleapis.com/auth/androidpublisher',
],
immediate = true;
gapi.auth.authorize(
{ client_id: client_id, scope: scope, immediate: immediate },
authResult => {
if (authResult && !authResult.error) {
} else {
}
});
After that you can use Google Play Android Developer API resources:
await gapi.client.androidpublisher.edits.commit({ editId: "editId", packageName: "packageName", });
await gapi.client.androidpublisher.edits.delete({ editId: "editId", packageName: "packageName", });
await gapi.client.androidpublisher.edits.get({ editId: "editId", packageName: "packageName", });
await gapi.client.androidpublisher.edits.insert({ packageName: "packageName", });
await gapi.client.androidpublisher.edits.validate({ editId: "editId", packageName: "packageName", });
await gapi.client.androidpublisher.generatedapks.download({ downloadId: "downloadId", packageName: "packageName", versionCode: 1, });
await gapi.client.androidpublisher.generatedapks.list({ packageName: "packageName", versionCode: 1, });
await gapi.client.androidpublisher.grants.create({ parent: "parent", });
await gapi.client.androidpublisher.grants.delete({ name: "name", });
await gapi.client.androidpublisher.grants.patch({ name: "name", });
await gapi.client.androidpublisher.inappproducts.delete({ packageName: "packageName", sku: "sku", });
await gapi.client.androidpublisher.inappproducts.get({ packageName: "packageName", sku: "sku", });
await gapi.client.androidpublisher.inappproducts.insert({ packageName: "packageName", });
await gapi.client.androidpublisher.inappproducts.list({ packageName: "packageName", });
await gapi.client.androidpublisher.inappproducts.patch({ packageName: "packageName", sku: "sku", });
await gapi.client.androidpublisher.inappproducts.update({ packageName: "packageName", sku: "sku", });
await gapi.client.androidpublisher.internalappsharingartifacts.uploadapk({ packageName: "packageName", });
await gapi.client.androidpublisher.internalappsharingartifacts.uploadbundle({ packageName: "packageName", });
await gapi.client.androidpublisher.monetization.convertRegionPrices({ packageName: "packageName", });
await gapi.client.androidpublisher.orders.refund({ orderId: "orderId", packageName: "packageName", });
await gapi.client.androidpublisher.reviews.get({ packageName: "packageName", reviewId: "reviewId", });
await gapi.client.androidpublisher.reviews.list({ packageName: "packageName", });
await gapi.client.androidpublisher.reviews.reply({ packageName: "packageName", reviewId: "reviewId", });
await gapi.client.androidpublisher.users.create({ parent: "parent", });
await gapi.client.androidpublisher.users.delete({ name: "name", });
await gapi.client.androidpublisher.users.list({ parent: "parent", });
await gapi.client.androidpublisher.users.patch({ name: "name", });