steadfastcollective / laravel-dailyco
Laravel SDK for Daily.co's REST API
Requires
- php: ^7.4|^8.0
- laravel/framework: ^7.0|^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^6.0|^7.0
- phpunit/phpunit: ^8.0|^9.0
This package is auto-updated.
Last update: 2024-10-29 06:00:24 UTC
README
This package is an unofficial SDK for Daily.co's REST API.
Installation
- Install with Composer
composer require steadfastcollective/laravel-dailyco
- Publish configuration file with
php artisan vendor:publish
- Add your Daily API key to your
.env
DAILY_API_KEY=
- You should now be able to perform API requests using the SDK! Follow the usage guide.
Usage
To make API requests with this package, you can either use the Facade, which we would recommend, or you could just manually new up the SteadfastCollective\LaravelDailyco\Daily
class and call the methods from there.
All of our below examples use the Facade.
Rooms
Get rooms
use SteadfastCollective\LaravelDailyco\DailyFacade; $rooms = DailyFacade::rooms();
Create room
use SteadfastCollective\LaravelDailyco\DailyFacade; $room = DailyFacade::createRoom([...]);
Get room
use SteadfastCollective\LaravelDailyco\DailyFacade; $room = DailyFacade::room('roomId', [...]);
Update room
use SteadfastCollective\LaravelDailyco\DailyFacade; $room = DailyFacade::updateRoom('roomId', [...]);
Delete room room
use SteadfastCollective\LaravelDailyco\DailyFacade; DailyFacade::deleteRoom('roomId', [...]);
Meeting tokens
Create meeting token
use SteadfastCollective\LaravelDailyco\DailyFacade; $token = DailyFacade::createMeetingToken([...]);
Get meeting token
use SteadfastCollective\LaravelDailyco\DailyFacade; $token = DailyFacade::meetingToken('meetingToken', [...]);
Recordings
Get recordings
use SteadfastCollective\LaravelDailyco\DailyFacade; $recordings = DailyFacade::recordings([...]);
Get a recording
use SteadfastCollective\LaravelDailyco\DailyFacade; $recording = DailyFacade::recording('recordingId', [...]);
Delete a recording
use SteadfastCollective\LaravelDailyco\DailyFacade; $recording = DailyFacade::deleteRecording('recordingId', [...]);
Get recording access link
use SteadfastCollective\LaravelDailyco\DailyFacade; $accessLink = DailyFacade::recordingAccessLink('recordingId', [...]);
Get recording download link
use SteadfastCollective\LaravelDailyco\DailyFacade; $downloadLink = DailyFacade::recordingDownload('recordingId', [...]);
Create recording composite recipe
use SteadfastCollective\LaravelDailyco\DailyFacade; $recipe = DailyFacade::createRecordingCompositesReceipe('recordingId', [...]);
Get recording composites
use SteadfastCollective\LaravelDailyco\DailyFacade; $composites = DailyFacade::recordingComposites('recordingId', [...]);
Logs
Get logs
use SteadfastCollective\LaravelDailyco\DailyFacade; $logs = DailyFacade::logs();
Meeting Analytics
Retrieve meeting analytics
use SteadfastCollective\LaravelDailyco\DailyFacade; $analytics = DailyFacade::meetingAnalytics();
Presence
Active participants
use SteadfastCollective\LaravelDailyco\DailyFacade; $participants = DailyFacade::presence();
Handling errors
This package will throw an exception whenever a non 200 response is returned from Daily's API. The full list of exceptions is provided below.
Security
If you find any security vulnerabilities in this package, please directly email dev@steadfastcollective.com, rather than using the issue tracker.