API.deleteBook
Questa azione ti consente di eliminare una pubblicazione del tuo abbonamento utilizzando la sua chiave univoca.
Richiesta
| api_key | Utilizza la tua chiave API |
| login | Utilizza l'indirizzo e-mail di un profilo account che ha accesso alle API. |
| md5_pwd | Utilizza la password dal profilo, crittografata in formato MD5. |
| subscription_code | Utilizza il codice API fornito nella pagina “I tuoi abbonamenti” o recuperato dall'API getAccountSubscriptions |
| book_code | Chiave di identificazione univoca della pubblicazione, fornita nella pagina « Le tue pubblicazioni » |
Risposta
Questa richiesta invia la stringa di caratteri “ok” se l'operazione è andata a buon fine.
In caso di problemi verrà restituito un messaggio di errore.
Esempio
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Delete a publication</title>
</head>
<body>
<?php
include_once('nusoap.php');
$client = new soapclient('http://api.calameo.com/?wsdl', true);
$err = $client->getError();
if ($err) {
// Displays errors
echo 'SOAP Error: ' . $err;
// If an error occurs, no need to continue
die('An error occurred! !');
}
$message = 'API.deleteBook';
$params = array (
'api_key' => '05511df55155d5a5bc5',
'login' => 'email@myaccount.com',
'md5_pwd' => 'd4f7ccab36fbfedc5f53e09d20d6973a',
'subscription_code' => '05511df55155d5a5bc5',
'book_code' => '05511df551231321'
);
$result = $client->call($message, $params);
if ($client->fault) {
// An error occurred
die('An error occurred !');
} else {
// Vérifie si une erreur SOAP n'a pas été renvoyée
$err = $client->getError();
if ($err) {
// Display the error
echo 'SOAP Error: ' . $err;
} else {
// All went well, you can process the result => $result
echo '<pre>';
print_r($result);
echo '</pre>';
}
}
?>
</body>
</html>
Loading...