API Docs for: 0.0.1
Show:

Query Class

Defined in: index.js:441
Module: itunesconnect

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

Constructor

Query

(
  • config
)
Query private chainable

Defined in index.js:441

Parameters:

  • config Object

Returns:

Methods

body

() String private

Defined in index.js:497

Builds and returns body for Connect request as JSON string

Returns:

String:

JSON String

category

(
  • <value>
)
chainable

Defined in index.js:713

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:

content

(
  • <value>
)
chainable

Defined in index.js:689

Sets content filter for Query

Parameters:

  • <value> Number | Array

    AppStore ID

date

(
  • <start>
  • [end]
)
chainable

Defined in index.js:591

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 | Date

    If end is undefined it will be set same as start. If String, must be in format YYYY-MM-DD

  • [end] String | Date optional

    If String, must be in format YYYY-MM-DD

group

(
  • value
)
chainable

Defined in index.js:641

Sets group by property for Query

Parameters:

  • value String

    One of following:

    • content String
    • type String
    • transaction String
    • category String
    • platform String
    • location String

interval

(
  • value
)
chainable

Defined in index.js:572

Sets interval property for Query

Parameters:

  • value String

    One of the following:

    • day String
    • week String
    • month String
    • quarter String
    • year String

limit

(
  • <value>
)
chainable

Defined in index.js:675

Sets limit property for Query

Parameters:

  • <value> Number

    Not sure if Apple is using limit in ranked type query

location

(
  • <value>
)
chainable

Defined in index.js:757

Sets location filter for Query

Parameters:

measures

(
  • <value>
)
chainable

Defined in index.js:661

Sets measures property for Query

Parameters:

  • <value> String | Array

platform

(
  • <value>
)
chainable

Defined in index.js:781

Sets platform filter for Query

Parameters:

  • <value> String | Array

    (Look in Constants under Platforms)

ranked

() private chainable

Defined in index.js:552

Initialize a new Query with the ranked type.

time

(
  • <value>
  • <unit>
)
chainable

Defined in index.js:621

Sets start property for Query in more easy/generic way

Examples:

query.time(1, 'week');
query.time(20, 'days');

Parameters:

  • <value> Number
  • <unit> String

    day, week, month, etc...

timed

() private chainable

Defined in index.js:532

Initialize a new Query with the timed type.

transaction

(
  • <value>
)
chainable

Defined in index.js:829

Sets transaction filter for Query

Parameters:

  • <value> String | Array

    (Look in Constants under Transactions)

type

(
  • <value>
)
chainable

Defined in index.js:805

Sets type filter for Query

Parameters:

  • <value> String | Array

    (Look in Constants under Types)