Socket
Socket
Sign inDemoInstall

@7nohe/app-store-connect-api-client

Package Overview
Dependencies
39
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@7nohe/app-store-connect-api-client

> App Store Connect API client for Node.js


Version published
Maintainers
1
Weekly downloads
1

Weekly downloads

Readme

Source

@7nohe/app-store-connect-api-client

App Store Connect API client for Node.js

Install

$ npm install -D @7nohe/app-store-connect-api-client

Usage

import { createClient, SalesReportFrequency } from '@7nohe/app-store-connect-api-client'
import path from 'path';

const privateKeyPath = path.resolve(__dirname, '/path/to/your/p8/file');

const client = createClient({
  apiKey: '<YOUR-API-KEY>',
  issuerId: '<YOUR-ISSUER-ID>',
  privateKey: {
    path: privateKeyPath
  }
})

const run = async () => {
  const result = await client.getSalesReports({
    vendorNumber: process.env.VENDOR_ID!,
    date: '2022-08-07',
    frequency: SalesReportFrequency.Weekly
  })
  console.log(result);
}

run();

For CI, a base64-encoded private key file can be set as an environment variable and passed as an option.

import { createClient } from '@7nohe/app-store-connect-api-client'
import * as dotenv from 'dotenv';
dotenv.config();

const client = createClient({
  apiKey: process.env.API_KEY!,
  issuerId: process.env.ISSUER_ID!,
  privateKey: Buffer.from(process.env.PRIVATE_KEY!, 'base64'),
})

Keywords

FAQs

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