Skip to content

Instantly share code, notes, and snippets.

@halvardos
Created March 10, 2017 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halvardos/992423362246563abfcd0eb0f9ffdd4c to your computer and use it in GitHub Desktop.
Save halvardos/992423362246563abfcd0eb0f9ffdd4c to your computer and use it in GitHub Desktop.
<?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