1.0.1 • Published 7 years ago
pomme-reporter v1.0.1
Pomme Reporter
iTunes Connect sales and financial reports fetcher.
ToDo
- Fetch
Subscription
report type - Fetch
SubscriptionEvent
report type - Fetch
Subscriber
report type - Fetch
Newsstand
report type - Fetch
Opt-in
sales report subtype - Fetch financial vendors and regions list
- Fetch financial report
License
Released under the terms of the MIT License.
Contributing
If you want to contribute, please read this guide.
Changelog
You ask yourself what has changed? Please read the changelog.
Installation
$ npm i --save pomme-reporter
Usage
Fetch Sales Accounts
const PommeReporter = require('pomme-reporter');
const ITC_USERNAME = 'itc_username';
const ITC_PASSWORD = 'itc_password';
PommeReporter.fetchSalesAccounts(ITC_USERNAME, ITC_PASSWORD)
.then(function (data) { console.log(data); })
.catch(function (err) { console.error(err); });
[
{
"name": "account name",
"number": "account number"
}
]
Fetch Sales status
const PommeReporter = require('pomme-reporter');
const ITC_USERNAME = 'itc_username';
const ITC_PASSWORD = 'itc_password';
PommeReporter.fetchSalesStatus(ITC_USERNAME, ITC_PASSWORD)
.then(function (data) { console.log(data); })
.catch(function (err) { console.error(err); });
{
"code": 0,
"message": "message"
}
Fetch Sales Vendors
const PommeReporter = require('pomme-reporter');
const ITC_USERNAME = 'itc_username';
const ITC_PASSWORD = 'itc_password';
PommeReporter.fetchSalesVendors(ITC_USERNAME, ITC_PASSWORD)
.then(function (data) { console.log(data); })
.catch(function (err) { console.error(err); });
[
"12345678"
]
Fetch Sales Report
const PommeReporter = require('pomme-reporter');
const ITC_USERNAME = 'itc_username';
const ITC_PASSWORD = 'itc_password';
const VENDOR_ID = 'vendor_id';
let params = {
vendor_number: VENDOR_ID, //required
report_type: 'Sales', //required
report_subtype: 'Summary', //required
date_type: 'Daily', //required
date: '2017-01-30' // optional
};
PommeReporter.fetchSalesReport(ITC_USERNAME, ITC_PASSWORD, params)
.then(function (data) { console.log(data); })
.catch(function (err) { console.error(err); });
[
{
"Provider": "APPLE",
"ProviderCountry": "US",
"SKU": "sku",
"Developer": "developer name",
"Title": "Loops - Your Personal Video Looper",
"Version": "1.6",
"ProductTypeIdentifier": "1F",
"Units": 1,
"DeveloperProceeds": 57.8,
"BeginDate": moment("2017-01-31T00:00:00.000"),
"EndDate": moment("2017-01-31T00:00:00.000"),
"CustomerCurrency": "EUR",
"CountryCode": "IT",
"CurrencyofProceeds": "EUR",
"AppleIdentifier": 'application store identifier',
"CustomerPrice": 100.0,
"PromoCode": null,
"ParentIdentifier": null,
"Subscription": null,
"Period": null,
"Category": "Utilities",
"CMB": null,
"Device": "iPad",
"SupportedPlatforms": "iOS",
"ProceedsReason": null,
"PreservedPricing": null,
"Client": null
}
]