Socket
Socket
Sign inDemoInstall

@7nohe/play-console-report-client

Package Overview
Dependencies
71
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @7nohe/play-console-report-client

Node.js library for getting report data from Google Play Console


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@7nohe/play-console-report-client

Node.js library for getting report data from Google Play Console

Install

$ npm install @7nohe/play-console-report-client

Usage

import { createClient } from "@7nohe/play-console-report-client";

const client = createClient({
  projectId: '<YOUR-PROJECT-ID>',
  credentials: {
    client_email: '<YOUR-CLIENT-EMAIL>',
    private_key: '<YOUR-PRIVATE-KEY>',
  },
});

const run = async () => {
  const statisticsReports = await client.getStatisticsReports({
    reportMonth: "202207",
    bucketName: '<YOUR-BUCKET-NAME>',
    packageName: '<YOUR-PACKAGE-NAME>',
  });
  console.log(statisticsReports); 
}

run();

credentials

You can get credential information (client_email and private_key) from a service account key.

Here is a guide to creating a service account key.

Also, you need to enable Google Play Developer API.

bucketName

You can find your bucket name in Play Console.

Click Download reports Reports, and select Reviews, Statistics, or Financial.

You can copy your Google Cloud Storage URI by clicking the Copy Cloud Storage URI button next to the corresponding section header on the Download reports pages.

copy-cloud-storage-uri

Your Google Cloud Storage URI should look like this.

gs://<YOUR-BUCKET-NAME>/stats/installs/

Accessing to Google Cloud resources without using a service account key

If your environment supports OpenID Connect (OIDC), we recommend using Workload identity federation.

You will be able to access GCP resources without storing credentials in your environment.

import { createClient } from "@7nohe/play-console-report-client";

const client = createClient({
  projectId: '<YOUR-PROJECT-ID>',
  // No credentials required.
});

API Documentation

Currently, only Statistics Reports API is available.

declare const createClient: (clientOptions: ClientOptions) => {
    getStatisticsReports: (options: GetStatisticsReportsOptions) => Promise<StatisticsReportData[]>;
};

Keywords

FAQs

Last updated on 21 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