Report Class
Initialize a new Query
with the given type
and config
.
Examples:
// Import itc-report
var itc = require("itunesconnect"),
Report = itc.Report;
// Init new iTunes Connect
var itunes = new itc.Connect('apple@id.com', 'password');
// Timed type query
var query = Report('timed');
// Ranked type query with config object
var query = Report('ranked', { limit: 100 });
// Advanced Example
var advancedQuery = Report('timed', {
start : '2014-04-08',
end : '2014-04-25',
limit : 100,
filters : {
content: [{AppID}, {AppID}, {AppID}],
location: [{LocationID}, {LocationID}],
transaction: itc.transaction.free,
type: [
itc.type.inapp,
itc.type.app
],
category: {CategoryID}
},
group: 'content'
});
Constructor
Report
(
Query
-
<type>
-
[config]
Parameters:
-
<type>
String -
[config]
Object optional-
[start]
String | Date optionalDate or if String must be in format YYYY-MM-DD
-
[end]
Object optionalDate or if String must be in format YYYY-MM-DD
-
[interval]
String optionalOne of the following:
-
day
String -
week
String -
month
String -
quarter
String -
year
String
-
-
[filters]
Object optionalPossible keys:
-
[content]
Number | Array optional -
[type]
String | Array optional -
[transaction]
String | Array optional -
[category]
Number | Array optional -
[platform]
String | Array optional -
[location]
Number | Array optional
-
-
[group]
String optionalOne of following:
-
content
String -
type
String -
transaction
String -
category
String -
platform
String -
location
String
-
-
[measures]
Object optional -
[limit]
Number optional
-
Returns:
Methods
ranked
(
Query
chainable
-
[config]
Initialize a new Query
with the ranked type and given config
.
Examples:
// Import itc-report
var itc = require("itunesconnect"),
Report = itc.Report;
// Init new iTunes Connect
var itunes = new itc.Connect('apple@id.com', 'password');
// Ranked type query
var query = Report.ranked();
// Another query
var otherQuery = Report.ranked({
limit: 10
});
Parameters:
-
[config]
Object optional
Returns:
timed
(
Query
chainable
-
[config]
Initialize a new Query
with the timed type and given config
.
Examples:
// Import itc-report
var itc = require("itunesconnect"),
Report = itc.Report;
// Init new iTunes Connect
var itunes = new itc.Connect('apple@id.com', 'password');
// Timed type query
var query = Report.timed();
// Another query
var otherQuery = Report.timed({
limit: 10
});
Parameters:
-
[config]
Object optional