Created
March 10, 2017 15:51
-
-
Save halvardos/992423362246563abfcd0eb0f9ffdd4c to your computer and use it in GitHub Desktop.
This file contains 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 __DIR__ . '/vendor/autoload.php'; | |
use SYNQ\lib\API; | |
// Init with api key and base url | |
$api = new API(getenv('SYNQ_API_KEY'), 'https://api.synq.fm/v1/'); | |
$videoId = '3245d2de337b46d1b04f9c73dd9bd504'; | |
// Create a new video object | |
$result = $api->video->details($videoId); | |
$body = json_decode($result->getBody()); | |
echo "Player url: " . $body->player->embed_url; | |
echo " Thumbnail url: " . $body->player->thumbnail_url; | |
echo " Views: " . $body->player->views; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment