Global

Members

reqStack

Object to hold data to send
window.location should change only once per tick to be registered

Source:
  • iosDelegate.js, line 39

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 272

externalURL( url )

Requests the app display a URL

Parameters:
Name Type Description
url String

The url to display

Source:
  • core.js, line 242

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 261

getSubscriptions( callback )

Requests a list of subscription info describing existing 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
}

If any subscriptions are returned marked as subscribed then the caller should not allow the user to
attempt to purchase any other subscriptions.

Note that Amazon subscription transactions use a parent identifier. This means that any subscriptions
with the same parent identifier (which should be all subscriptions for publication) will be marked as
subscribed.

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 327

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 283

loginStateChanged( callback )

Returns asynchronously the user details for the currently logged in third party user.
Calling this function more than once will overwrite the callback used with the last one called.
On setting the callback the callback will be immediately called with the current login state.
On successful login the results object will contain:
{
userName: string
}

Parameters:
Name Type Description
callback Function

The callback function called when login state changes in the app. Passed the results dictionary. Should take a result parameter.

Source:
  • core.js, line 303

logout( )

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

Source:
  • core.js, line 290

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 235

subscribe( callback )

Attempts to subscribe to a subscription identified by subscriptionId.
Will be called back with a status of success, cancelled or failed with the following metadata:
{
identifier: string,
status: number,
expiry: string of the form YYYY-MM-dd-'T'-HH:mm:ss'Z' (optional)
}
status codes are defined as follows:
SubscriptionStatus: {
SUCCESS: 100,
CANCELLED: 101,
FAILED: 102
}

Notes on Play Store purchases:
- they do not provide expiry dates.

Notes on Amazon Store purchases:
- they do not provide expiry dates
- cancelled purchase events are not distinguishable from failed events so will be returned with the
FAILED status code.

Parameters:
Name Type Description
callback Function

The function to call when the subscriptions are available. Should take parameters
for identifier, status and expiry.

Source:
  • core.js, line 356
Top