This package is a Laravel wrapper around the api.video API that lets you upload & manage your videos directly from your Laravel app. This package is unofficial and is maintained by Steadfast Collective.
- Install with Composer
composer require steadfastcollective/laravel-api-video
- Publish the configuration file
php artisan vendor:publish --tag="api-video-config"
- Add your API key and the API URI to your
.env
API_VIDEO_URL=https://sandbox.api.video
API_VIDEO_KEY=....
The primary way to use this package is via the Facade. If you'd prefer to not use the class, you may use the ApiVideo
class directly, like the below example.
use SteadfastCollective\ApiVideo\ApiVideo;
return (new ApiVideo)->getVideo(...);
TODO: docs link
use SteadfastCollective\ApiVideo\Facades\ApiVideo;
return ApiVideo::getDelegateToken();
use SteadfastCollective\ApiVideo\Facades\ApiVideo;
return ApiVideo::getVideo($videoId);
Parameters
videoId
: The unique identifier for the video you want details about.
use SteadfastCollective\ApiVideo\Facades\ApiVideo;
return ApiVideo::updateVideo($videoId, [$params]);
Parameters
videoId
: The video ID for the video you want to update.params
: Array of parameters you wish to send to api.video. List of available parameters.
use SteadfastCollective\ApiVideo\Facades\ApiVideo;
return ApiVideo::deleteVideo($videoId);
Parameters
videoId
: The video ID for the video you want to delete.
Currently this SDK only provides a few of the available API methods provided by api.video's API. However, if you're in need of any others, please create an issue and we'll see to adding it!
Laravel api.video is open-sourced software licensed under the MIT license.