<?php // Don't forget to rename creds-dist.php to creds.php and insert your API key require __DIR__ . '/creds.php'; require __DIR__ . '/../vendor/autoload.php'; $bundle = new \Clarify\Bundle($apikey); $results = $bundle->index(); $items = $results['_links']['items']; foreach ($items as $item) { $_bundle = $bundle->load($item['href']); echo $_bundle['_links']['self']['href'] . "\n"; echo $_bundle['name'] . "\n"; } $page = $bundle->getNextPage(); print_r($page);
<?php // Don't forget to rename creds-dist.php to creds.php and insert your API key require __DIR__ . '/creds.php'; require __DIR__ . '/../vendor/autoload.php'; $bundle = new \Clarify\Bundle($apikey); $success = $bundle->create("Dorothy and the Wizard of Oz", 'http://media.clarify.io/audio/books/dorothyandthewizardinoz_01_baum_64kb.mp3'); if ($success) { $newURI = $bundle->detail['_links']['self']['href']; echo $newURI . "\n"; $item = $bundle->load($newURI); print_r($item); } else { echo $bundle->detail['message'] . "\n"; }