Created
March 10, 2017 15:40
-
-
Save halvardos/d3288d9ed3fa2435b7b57c1ba2a5c049 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/'); | |
// Create a new video object | |
$result = $api->video->create($userdata = ['test' => 123]); | |
// Get the video id of the object we just created | |
$body = json_decode($result->getBody()); | |
$videoId = $body->video_id; | |
// Call uploader to get an embeddable url | |
$result = $api->video->uploader($videoId); | |
$body = json_decode($result->getBody()); | |
echo $body->uploader_url; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment