<?php header('Content-type: text/plain; charset=utf-8'); require_once 'botr/api.php'; // Please update xxxx with your key and yyyy with your secret $botr_api = new BotrAPI('xxxxxxxx', 'yyyyyyyyyyyyyyyyyyyyyyyy'); // Here's an example call that lists all videos. print_r($botr_api->call("/videos/list")); // Video details example; update zzzz with a video_key listed by the call above. // print_r($botr_api->call("/videos/show", array('video_key' => 'zzzzzzzz'))); // Thumbnail upload example; again replace zzzz with your video key. /* $response = $botr_api->call("/videos/thumbnails/update", array('video_key' => 'zzzzzzzz')); if ($response['status'] == "error") { print_r($response); } else { $response = $botr_api->upload($response['link'], "./thumbnail.jpg"); print_r($response); } */
/** * JW Platform API: Return PubDate for admin dashboard display. (Human Friendly Format) * Format: Jan 11 2016, 4:09pm * Returns the publish date of a video based on the player key. */ function fcc_jw_date_admin($key) { $botr_api = new BotrAPI(get_option('options_jw_platform_api_key'), get_option('options_jw_platform_api_secret')); // Instantiate the API. $response = $botr_api->call("/videos/show", array('video_key' => $key)); // TODO: JW Admin Date - Add Success/Fail validation & AJAX support $pubdate = $response['video']['date']; $pubdate = date('M d Y, g:ia', $pubdate); return $pubdate; }