This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| def x_values | |
| %w(a b c d) | |
| end | |
| def y_values | |
| %w(m n o p) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require '../vendor/autoload.php'; | |
| $bundle = new Clarify\Bundle($apikey); | |
| $items = $bundle->search($terms); | |
| $search_terms = json_encode($items['search_terms']); | |
| $item_results = json_encode($items['item_results']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is dependent on the code snippet listed above | |
| $results = $result['item_results']; | |
| $items = $result['_links']['items']; | |
| foreach($items as $index => $item) { | |
| $_bundle = $bundle->load($item['href']); | |
| echo $_bundle['_links']['self']['href'] . "\n"; | |
| echo $_bundle['name'] . "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require '../vendor/autoload.php'; | |
| $bundle = new Clarify\Bundle('my api key'); | |
| $page = $bundle->search('dorothy'); | |
| $results = $page['item_results']; | |
| $items = $page['_links']['items']; | |
| foreach ($items as $index => $item) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require '../vendor/autoload.php'; | |
| $bundle = new Clarify\Bundle('my api key'); | |
| $result = $bundle->create('Dorothy and the Wizard of Oz', 'http://media.clarify.io/audio/books/dorothyandthewizardinoz_01_baum_64kb.mp3'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require '../vendor/autoload.php'; | |
| $bundle = new Clarify\Bundle('my api key'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "require": { | |
| "clarify/clarify-helper": "~1.2.1" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "bundle_id":"abcdef", | |
| "track_id":"123456", | |
| "updated":"2014-08-25T22:12:39.574Z", | |
| "name":"Dorothy and the Wizard of Oz", | |
| "external_id":"my_id_123", | |
| "_class":"TrackNotification", | |
| "_links":{ | |
| "curies":[{ | |
| "href":"/docs/rels/{rel}","name":"clarify","templated":true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "bundle_id":"abcdef", | |
| "updated":"2014-08-25T22:12:39.574Z", | |
| "bundle_processing_cost":0.1, | |
| "name":"Dorothy and the Wizard of Oz", | |
| "external_id":"my_id_123", | |
| "_class":"BundleNotification", | |
| "_links":{ | |
| "curies":[{ | |
| "href":"/docs/rels/{rel}","name":"clarify","templated":true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Don't forget to rename creds-dist.php to creds.php and insert your API key | |
| require 'creds.php'; | |
| // This assumes you've installed the library via composer | |
| require 'vendor/autoload.php'; | |
| $bundle = new \Clarify\Bundle($apikey); | |
| $success = $bundle->create( |