itc-reporter
v1.0.6
Published
iTunes Connect Reporter Tool for Node.js
Downloads
4
Readme
itc-reporter
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