Query Class
Initialize a new Query
with the given query
.
Constants to use with Query
// Import itc-report
var itc = require("itunesconnect"),
// Types
itc.type.inapp
itc.type.app
// Transactions
itc.transaction.free
itc.transaction.paid
itc.transaction.redownload
itc.transaction.update
itc.transaction.refund
// Platforms
itc.platform.desktop
itc.platform.iphone
itc.platform.ipad
itc.platform.ipod
// Measures
itc.measure.proceeds
itc.measure.units
Item Index
Methods
body
()
String
private
Builds and returns body for Connect request as JSON string
Returns:
JSON String
category
-
<value>
Sets category filter for Query
Examples:
// Import itc-report
var itc = require("itunesconnect"),
Report = itc.Report;
// Query
var query = Report.timed({
limit: 10
}).category(6001);
// Another Query
var otherQuery = Report.timed({
limit: 10
});
//
otherQuery.category([6001, 6002, 6003]);
otherQuery.category([6004, 6005, 6006]).category(6007);
Parameters:
-
<value>
Number | ArrayVisit https://github.com/stoprocent/itc-report/wiki/Cheet-Sheet#categories for available options
content
-
<value>
Sets content filter for Query
Parameters:
-
<value>
Number | ArrayAppStore ID
date
-
<start>
-
[end]
Sets start and end property for Query
Examples:
// Start and end date set manualy
query.date('2014-04-08', new Date());
// Start and end date will be todays date
query.date(new Date());
// Start and end date will be set as 8th of April 2014
query.date('2014-04-08');
Parameters:
-
<start>
String | DateIf end is undefined it will be set same as start. If String, must be in format YYYY-MM-DD
-
[end]
String | Date optionalIf String, must be in format YYYY-MM-DD
group
-
value
Sets group by
property for Query
Parameters:
-
value
StringOne of following:
-
content
String -
type
String -
transaction
String -
category
String -
platform
String -
location
String
-
interval
-
value
Sets interval property for Query
Parameters:
-
value
StringOne of the following:
-
day
String -
week
String -
month
String -
quarter
String -
year
String
-
limit
-
<value>
Sets limit property for Query
Parameters:
-
<value>
NumberNot sure if Apple is using limit in ranked type query
location
-
<value>
Sets location filter for Query
Parameters:
-
<value>
Number | ArrayVisit https://github.com/stoprocent/itc-report/wiki/Cheet-Sheet#countries for available options
measures
-
<value>
Sets measures property for Query
Parameters:
-
<value>
String | Array
platform
-
<value>
Sets platform filter for Query
Parameters:
-
<value>
String | Array(Look in Constants under Platforms)
ranked
()
private
chainable
Initialize a new Query
with the ranked type.
time
-
<value>
-
<unit>
Sets start property for Query
in more easy/generic way
Examples:
query.time(1, 'week');
query.time(20, 'days');
Parameters:
-
<value>
Number -
<unit>
Stringday, week, month, etc...
timed
()
private
chainable
Initialize a new Query
with the timed type.
transaction
-
<value>
Sets transaction filter for Query
Parameters:
-
<value>
String | Array(Look in Constants under Transactions)
type
-
<value>
Sets type filter for Query
Parameters:
-
<value>
String | Array(Look in Constants under Types)