API.fetchSubscriptionBooks
This SOAP-based API is deprecated. Please use the REST-based API instead.
This action allows you to fetch a subscription's publications.
Request
| Name | Type | Description |
|---|---|---|
| api_key (required) | string | Use your API key |
| login (required) | string | Use the e-mail address of an account profile that has access to the APIs. |
| md5_pwd (required) | string | Use the password from the profile, encrypted in MD5 format. |
| subscription_code (required) | string | Use the subscription API code supplied in the “Your subcriptions” page, or fetched with API.getAccountSubscriptions. |
| order | string | String of characters used to define the organization criteria of the publications (see sorting) |
| way | string | String of characters used to define the sort order. Either UP (default) or DOWN. |
| start | integer | Start position of the range of publications. Default is 0. |
| step | integer | Number of publications to be sent from the start position. |
Response
This method returns an array of publications.
Example
This example shows how to recover the 10 most read publications of a subscription:
include_once('nusoap.php');
$client = new soapclient('http://api.calameo.com/?wsdl', true);
$err = $client->getError();
if ($err) {
echo 'SOAP Error: ' . $err;
die();
}
$message = 'API.fetchSubscriptionBooks';
$params = array (
'api_key' => '123346544abdefbca1546854',
'login' => 'email@myaccount.com',
'md5_pwd' => 'd4f7ccab36fbfedc5f53e09d20d6973a',
'subscription_code' => '05511df55155d5a5bc5',
'order' => 'Views',
'way' => 'DOWN',
'start' => 0,
'step' => 10
);
$result = $client->call($message, $params);
// Process $result
Error codes
See the error code section.
