npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@maxim_mazurok/gapi.client.androidpublisher

v3.0.20220811

Published

TypeScript typings for Google Play Android Developer API v3

Downloads

1,693

Readme

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