AS Media Solutions offers a JSON/JSONP developer API for custom implementations of the content locking mechanism.
How to enable the API
To enable the API access, log in to the AS Media Solutions dashboard and go to "My Account". Click the "Enable API" button. An API Key will be generated for your account. This key is needed in order to make requests and connect them with your account.
Getting offers and checking for completion
Initialize the AS Media Solutions API using the code from the example below. Replace the API_KEY with your API Key and LOCKER_ID with your locker ID (alphanumerical string). You will need two functions that will be passed to the get() method. The first one is used to display the offers returned by the API and the second one for when the user completes an offer. You do not need to make any checks for offer completion since the SDK does it automatically once it is initialized.
var MyLocker = new CPABlend();
Get the offers
If the user has not completed an offer, the first function will be called to display the offers to the user. You can customize the output any way you want. In the meantime automated checks are made to see if the user has completed an offer. Once a positive response is returned, the second function is called to display the download button and enable the user to download the locked content.
Download sample code
Demo of the advanced example