steadfastcollective/laravel-api-video

v1.0.0 2021-06-22 10:21 UTC

This package is auto-updated.

Last update: 2024-11-28 23:23:41 UTC


README

Logo api.video

Total Downloads Latest Stable Version License

Introduction

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.

Documentation

Installation

  1. Install with Composer
composer require steadfastcollective/laravel-api-video
  1. Publish the configuration file
php artisan vendor:publish --tag="api-video-config"
  1. Add your API key and the API URI to your .env
API_VIDEO_URL=https://sandbox.api.video
API_VIDEO_KEY=....

Usage

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(...);

Get delegate token

TODO: docs link

use SteadfastCollective\ApiVideo\Facades\ApiVideo;

return ApiVideo::getDelegateToken();

Get video

Docs: Show a video

use SteadfastCollective\ApiVideo\Facades\ApiVideo;

return ApiVideo::getVideo($videoId);

Parameters

  • videoId: The unique identifier for the video you want details about.

Update video

Docs: Update a video

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.

Delete video

Docs: Delete a video

use SteadfastCollective\ApiVideo\Facades\ApiVideo;

return ApiVideo::deleteVideo($videoId);

Parameters

  • videoId: The video ID for the video you want to delete.

Other endpoints?

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!

License

Laravel api.video is open-sourced software licensed under the MIT license.