A simple way to use Brightcove's VideoCloud Analytics API
jasonadriaan/videocloudanalytics is a Laravel package for a simple way to use brightcove's videocloud analytics api.
It currently has 0 GitHub stars and 5 downloads on Packagist.
Install it with composer require jasonadriaan/videocloudanalytics.
Discover more Laravel packages by jasonadriaan
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it simple for you to retrieve analytics from Brightcove VideoCloud's Analytics 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/videocloudanalytics
You will need to publish the config file with:
php artisan vendor:publish --tag="videocloudanalytics-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 Analytics API documentation to understand the underlying API.
Basic usage within your app would be as follows:
use Jasonadriaan\VideoCloudAnalytics\VideoCloudAnalytics;
class main extends Controller
{
public function index(){
$videocloud = new VideoCloudAnalytics();
$items = $videocloud->dimensions('date')
->from('2021-08-04')
->to('2022-01-31')
->fields('date,daily_unique_viewers,video_view')
->sort('date')
->limit(30)
->get();
return $items;
}
}
Notes:
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.