Socket
Socket
Sign inDemoInstall

@maxim_mazurok/gapi.client.androidpublisher

Package Overview
Dependencies
1
Maintainers
1
Versions
277
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @maxim_mazurok/gapi.client.androidpublisher

TypeScript typings for Google Play Android Developer API v3


Version published
Weekly downloads
475
increased by37.28%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

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

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 Android Developer API resources:


/*
Commits an app edit.
*/
await gapi.client.androidpublisher.edits.commit({ editId: "editId", packageName: "packageName",  });

/*
Deletes an app edit.
*/
await gapi.client.androidpublisher.edits.delete({ editId: "editId", packageName: "packageName",  });

/*
Gets an app edit.
*/
await gapi.client.androidpublisher.edits.get({ editId: "editId", packageName: "packageName",  });

/*
Creates a new edit for an app.
*/
await gapi.client.androidpublisher.edits.insert({ packageName: "packageName",  });

/*
Validates an app edit.
*/
await gapi.client.androidpublisher.edits.validate({ editId: "editId", packageName: "packageName",  });

/*
Downloads a single signed APK generated from an app bundle.
*/
await gapi.client.androidpublisher.generatedapks.download({ downloadId: "downloadId", packageName: "packageName", versionCode: 1,  });

/*
Returns download metadata for all APKs that were generated from a given app bundle.
*/
await gapi.client.androidpublisher.generatedapks.list({ packageName: "packageName", versionCode: 1,  });

/*
Grant access for a user to the given package.
*/
await gapi.client.androidpublisher.grants.create({ parent: "parent",  });

/*
Removes all access for the user to the given package or developer account.
*/
await gapi.client.androidpublisher.grants.delete({ name: "name",  });

/*
Updates access for the user to the given package.
*/
await gapi.client.androidpublisher.grants.patch({ name: "name",  });

/*
Deletes an in-app product (i.e. a managed product or a subscriptions).
*/
await gapi.client.androidpublisher.inappproducts.delete({ packageName: "packageName", sku: "sku",  });

/*
Gets an in-app product, which can be a managed product or a subscription.
*/
await gapi.client.androidpublisher.inappproducts.get({ packageName: "packageName", sku: "sku",  });

/*
Creates an in-app product (i.e. a managed product or a subscriptions).
*/
await gapi.client.androidpublisher.inappproducts.insert({ packageName: "packageName",  });

/*
Lists all in-app products - both managed products and subscriptions. If an app has a large number of in-app products, the response may be paginated. In this case the response field `tokenPagination.nextPageToken` will be set and the caller should provide its value as a `token` request parameter to retrieve the next page.
*/
await gapi.client.androidpublisher.inappproducts.list({ packageName: "packageName",  });

/*
Patches an in-app product (i.e. a managed product or a subscriptions).
*/
await gapi.client.androidpublisher.inappproducts.patch({ packageName: "packageName", sku: "sku",  });

/*
Updates an in-app product (i.e. a managed product or a subscriptions).
*/
await gapi.client.androidpublisher.inappproducts.update({ packageName: "packageName", sku: "sku",  });

/*
Uploads an APK to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.
*/
await gapi.client.androidpublisher.internalappsharingartifacts.uploadapk({ packageName: "packageName",  });

/*
Uploads an app bundle to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.
*/
await gapi.client.androidpublisher.internalappsharingartifacts.uploadbundle({ packageName: "packageName",  });

/*
Calculates the region prices, using today's exchange rate and country-specific pricing patterns, based on the price in the request for a set of regions.
*/
await gapi.client.androidpublisher.monetization.convertRegionPrices({ packageName: "packageName",  });

/*
Refunds a user's subscription or in-app purchase order. Orders older than 1 year cannot be refunded.
*/
await gapi.client.androidpublisher.orders.refund({ orderId: "orderId", packageName: "packageName",  });

/*
Gets a single review.
*/
await gapi.client.androidpublisher.reviews.get({ packageName: "packageName", reviewId: "reviewId",  });

/*
Lists all reviews.
*/
await gapi.client.androidpublisher.reviews.list({ packageName: "packageName",  });

/*
Replies to a single review, or updates an existing reply.
*/
await gapi.client.androidpublisher.reviews.reply({ packageName: "packageName", reviewId: "reviewId",  });

/*
Grant access for a user to the given developer account.
*/
await gapi.client.androidpublisher.users.create({ parent: "parent",  });

/*
Removes all access for the user to the given developer account.
*/
await gapi.client.androidpublisher.users.delete({ name: "name",  });

/*
Lists all users with access to a developer account.
*/
await gapi.client.androidpublisher.users.list({ parent: "parent",  });

/*
Updates access for the user to the developer account.
*/
await gapi.client.androidpublisher.users.patch({ name: "name",  });

FAQs

Last updated on 11 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc