This package makes it simple for you to retrieve and update videos on Brightcove VideoCloud's CMS API without having to deal with authentication or repetitive api calls.
I build and maintain this project in my free time. If it makes your life simpler you can buy me a coffee.
You can install the package via composer:
composer require jasonadriaan/videocloudcms
You can publish the config file with:
php artisan vendor:publish --tag="videocloudcms-config"
In your .env file please add the following lines with your API details from Brightcove VideoCloud
VIDEOCLOUD_ACCOUNT_ID=xxxxx
VIDEOCLOUD_API_KEY=xxxxx
VIDEOCLOUD_API_SECRET=xxxxx
I would recommend you go ahead and read the VideoCloud CMS API documentation to understand the underlying API.
Updating a Video:
use Jasonadriaan\VideoCloudCMS\VideoCloudCMS;
class main extends Controller
{
public function index(){
$payload = array(
'name' => 'Scooby Doo!',
);
$videocloud = new VideoCloudCMS();
/* Update requires a video id and a payload
* eg. update($video_id, $payload)
*/
$result = $videocloud->update(1234567890, $payload);
return $result;
}
}
Get a list of videos:
use Jasonadriaan\VideoCloudCMS\VideoCloudCMS;
class main extends Controller
{
public function index(){
$videocloud = new VideoCloudCMS();
$result = $videocloud->limit(5)
->offset(2)
->query()
->sort()
->getVideos();
return $result;
}
}
Get a specific video:
use Jasonadriaan\VideoCloudCMS\VideoCloudCMS;
class main extends Controller
{
public function index(){
$videocloud = new VideoCloudCMS();
/* getVideo requires a video id
* eg. getVideo($video_id)
*/
$result = $videocloud->getVideo(1234567);
return $result;
}
}
Get a count of how many videos are on the system:
use Jasonadriaan\VideoCloudCMS\VideoCloudCMS;
class main extends Controller
{
public function index(){
$videocloud = new VideoCloudCMS();
$result = $videocloud->getCount();
return $result;
}
}
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.