Skip to content

smarteducationltd/itc-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

itc-reporter

wercker status Dependency Status

iTunes Connect Reporter Tool for Node.js

Installation

npm install --save itc-reporter

Example

Sales Report

const itcReporter = require('itc-reporter');
const zlib = require('zlib');

const reporter = new itcReporter.Sales({
  accessToken: 'YOUR ACCESS TOKEN',
  account: 'YOUR ACCOUNT',
  mode: 'Robot.XML',
});
const reader = reporter.getReport({
  vendorNumber: 'YOUR VENDOR NUMBER',
  reportType: 'Sales',
  reportSubType: 'Summary',
  dateType: 'Daily',
  date: 20160101
});
reader.on('response', res => {
  if (res.statusCode === 200) return;
  throw new Error(res.statusCode);
});
reader.pipe(zlib.createGunzip()).pipe(process.stdout);

Earnings Report

const itcReporter = require('itc-reporter');
const zlib = require('zlib');

const reporter = new itcReporter.Finance({
  accessToken: 'YOUR ACCESS TOKEN',
  account: 'YOUR ACCOUNT',
  mode: 'Robot.XML',
});
const reader = reporter.getReport({
  vendorNumber: 'YOUR VENDOR NUMBER',
  regionCode: 'JP',
  reportType: 'Financial',
  fiscalYear: 2016,
  fiscalPeriod: 8,
});
reader.on('response', res => {
  if (res.statusCode === 200) return;
  throw new Error(res.statusCode);
});
reader.pipe(zlib.createGunzip()).pipe(process.stdout);

Author

License

MIT

About

iTunes Connect Reporter Tool for Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published