serch3 / bunny-stream
A Lightweight PHP SDK for Bunny.net Streaming API
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/serch3/bunny-stream
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.8
- psr/http-message: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^3.0
- phpstan/phpstan: ^1.10
README
A modern, robust PHP library to interact with the Bunny Stream API.
Requirements
- PHP 8.2+
- Composer
Installation
composer require serch3/bunny-stream
Quick Start
Initialize the client with your API Key and Library ID:
use Bunny\Stream\Client; $client = new Client('YOUR_API_KEY', 'YOUR_LIBRARY_ID');
Basic Usage
List Videos:
$videos = $client->video()->list(); foreach ($videos['items'] as $video) { echo $video['title'] . "\n"; }
Upload a Video (Resumable):
// 1. Create a video entry $video = $client->video()->create('My Awesome Video'); // 2. Upload using Tus $uploader = $client->tus()->createUpload( $video['guid'], '/path/to/video.mp4' ); $uploader->upload();
Manage Collections:
$client->collection()->create('New Collection');
Documentation
For a complete list of available methods and parameters, please see the API Reference.
Upgrading
Upgrading from v1? Check out the Upgrade Guide.
License
MIT