Global

Methods

accessIssue( )

Performs an action on an issue. If the user has no access it will trigger a buy If the user has access it will trigger a download, if the user has downloaded the issue it will open the issue. Response callback has the following parameters: state: purchase/download/view/purchaseComplete/purchaseFailed, size: number, progress: number,

Source:
  • core.js, line 255

externalURL( url )

Requests the app display a URL

Parameters:
Name Type Description
url String

The url to display

Source:
  • core.js, line 225

getIssues( limit, callback )

Requests a list of the available issues within the app. Each issue will be returned with the following metadata: { title: string, publishedDate: YYYY-MM-dd-'T'-HH:mm:ss'Z', description: string, issueIdentifier: string, state: purchase/download/view, price: string (optional) }

Parameters:
Name Type Description
limit Number

How many items should be returned? 0 will return all issues

callback function

The function to call when the issues are available. Should take a result parameter which will contain the array of issues. This callback will be retained by the app and called as required if the issue metadata changes.

Source:
  • core.js, line 244

getSubscriptions( callback )

Requests a list of subscription info describing existing Apple subscriptions in the app. 'Price' info may not be available when called as this data may not have been returned by the App Store yet. Each subscription will be returned with the following metadata: { title: string, identifier: string, price: string (optional) subscribed: bool }

Parameters:
Name Type Description
callback function

The function to call when the subscriptions are available. Should take a result parameter which will contain the array of subscriptions.

Source:
  • core.js, line 300

loggedInUser( callback )

Returns the user details for the currently logged in third party user On successful login the results object will contain: { userName: string }

Parameters:
Name Type Description
callback function

The callback function to call to get the results dictionary. Should take a result parameter.

Source:
  • core.js, line 284

login( callback )

Invoke a login action in the app. On successful login the results dictionary will contain: { userName: string }

Parameters:
Name Type Description
callback function

The function to call when the login succeeds or fails. Should take a result parameter.

Source:
  • core.js, line 266

logout( )

Invoke a logout action in the app. Method will return immediately and contains no callback.

Source:
  • core.js, line 273

offline( callback )

Is the device currently offline?

Parameters:
Name Type Description
callback function

The function to call when the value is available. Should take a result parameter

Source:
  • core.js, line 218
Top