daily-ruby
Daily - the Ruby gem for the Daily API
The Daily REST API offers the ability to manage the following:
- Overall Domain Configuration
- Individual Room creation and config management
- Meeting token creation and validation
- Recording and compositing management
- Meeting analytics
- Logs and metrics
- Real-time presence
Please reach out to [email protected] if we can help with anything
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.1.1
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://docs.daily.co
Installation
Build a gem
To build the Ruby code into a gem:
gem build daily-ruby.gemspec
Then either install the gem locally:
gem install ./daily-ruby-1.0.0.gem
(for development, run gem install --dev ./daily-ruby-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'daily-ruby', '~> 1.0.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'daily-ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'daily-ruby'
# Setup authorization
Daily.configure do |config|
# Configure Bearer authorization: bearerAuth
config.api_key['sec0'] = ENV['DAILY_API_KEY']
config.api_key_prefix['sec0'] = 'Bearer'
# Configure faraday connection
# config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end
room_api_instance = Daily::RoomsApi.new
opts = {
room_request: Daily::CreateRoomRequest.new(
privacy: 'private',
properties: Daily::RoomProperties.new({
exp: (Time.now + (3600 * 2)).to_i, # Delete the room after two hours
enable_mesh_sfu: true,
sfu_switchover: 0.5
})
)
}
begin
# Create a new room
room = room_api_instance.create_room(opts)
p room
rescue Daily::ApiError => e
puts "Error when calling RoomApi->create_room: #{e}"
end
meeting_token_api_instance = Daily::MeetingTokensApi.new
# Create an owner meeting_token for the room with privacy set to private and
# the expiration set to 2 hours from now.
opts = {
create_meeting_token_request: Daily::CreateMeetingTokenRequest.new({
properties: {
is_owner: true,
room_name: room.name,
exp: (Time.now + (3600 * 2)).to_i # Expire the token after two hours
}
})
}
p opts
begin
# Create a new meeting token
meeting_token = meeting_token_api_instance.create_meeting_token(opts)
p meeting_token
rescue Daily::ApiError => e
puts "Error when calling MeetingTokensApi->create_meeting_token: #{e}"
end
p "Room url: " + room.url
p "Meeting token: " + meeting_token.token
Documentation for API Endpoints
All URIs are relative to https://api.daily.co/v1
Class | Method | HTTP request | Description |
---|---|---|---|
Daily::BatchRoomsApi | batch_room_create | POST /batch/rooms | /batch/rooms |
Daily::BatchRoomsApi | batch_room_delete | DELETE /batch/rooms | /batch/rooms |
Daily::DomainApi | get_domain_config | GET / | Get domain configuration |
Daily::DomainApi | set_domain_config | POST / | Set domain configuration |
Daily::LogsApi | list_api_logs | GET /logs/api | /logs/api |
Daily::LogsApi | list_logs | GET /logs | /logs |
Daily::MeetingTokensApi | create_meeting_token | POST /meeting-tokens | meeting-tokens |
Daily::MeetingTokensApi | validate_meeting_token | GET /meeting-tokens/meeting_token | meeting-tokens/:meeting_token |
Daily::MeetingsApi | get_individual_meeting_info | GET /meetings/meeting | /meetings/:meeting |
Daily::MeetingsApi | get_meeting_info | GET /meetings | /meetings |
Daily::MeetingsApi | get_meeting_participants | GET /meetings/meeting/participants | /meetings/:meeting/participants |
Daily::PresenceApi | get_presence | GET /presence | /presence |
Daily::RecordingsApi | delete_recording | DELETE /recordings/recording_id | recordings/:id |
Daily::RecordingsApi | get_recording_info | GET /recordings/recording_id | recordings/:id |
Daily::RecordingsApi | get_recording_link | GET /recordings/recording_id/access-link | recordings/:id/access-link |
Daily::RecordingsApi | list_recordings | GET /recordings | /recordings |
Daily::RoomsApi | create_room | POST /rooms | /rooms |
Daily::RoomsApi | delete_room | DELETE /rooms/room_name | rooms/:name |
Daily::RoomsApi | eject | POST /rooms/room_name/eject | rooms/:name/eject |
Daily::RoomsApi | get_room_config | GET /rooms/room_name | rooms/:name |
Daily::RoomsApi | get_room_presence | GET /rooms/room_name/presence | rooms/:name/presence |
Daily::RoomsApi | get_session_data | GET /rooms/room_name/get-session-data | rooms/:name/get-session-data |
Daily::RoomsApi | list_rooms | GET /rooms | /rooms |
Daily::RoomsApi | room_livestreaming_start | POST /rooms/room_name/live-streaming/start | rooms/:name/live-streaming/start |
Daily::RoomsApi | room_livestreaming_stop | POST /rooms/room_name/live-streaming/stop | rooms/:name/live-streaming/stop |
Daily::RoomsApi | room_livestreaming_update | POST /rooms/room_name/live-streaming/update | rooms/:name/live-streaming/update |
Daily::RoomsApi | room_recordings_start | POST /rooms/room_name/recordings/start | rooms/:name/recordings/start |
Daily::RoomsApi | room_recordings_stop | POST /rooms/room_name/recordings/stop | rooms/:name/recordings/stop |
Daily::RoomsApi | room_recordings_update | POST /rooms/room_name/recordings/update | rooms/:name/recordings/update |
Daily::RoomsApi | room_transcription_start | POST /rooms/room_name/transcription/start | rooms/:name/transcription/start |
Daily::RoomsApi | room_transcription_stop | POST /rooms/room_name/transcription/stop | rooms/:name/transcription/stop |
Daily::RoomsApi | send_app_message | POST /rooms/room_name/send-app-message | rooms/:name/send-app-message |
Daily::RoomsApi | set_room_config | POST /rooms/room_name | rooms/:name |
Daily::RoomsApi | set_session_data | POST /rooms/room_name/set-session-data | rooms/:name/set-session-data |
Daily::RoomsApi | update_permissions | POST /rooms/room_name/update-permissions | rooms/:name/update-permissions |
Daily::TranscriptApi | delete_transcript | DELETE /transcript/transcriptId | transcript/:id |
Daily::TranscriptApi | get_transcript_info | GET /transcript/transcriptId | transcript/:transcriptId |
Daily::TranscriptApi | get_transcript_link | GET /transcript/transcriptId/access-link | transcript/:id/access-link |
Daily::TranscriptApi | list_transcript | GET /transcript | /transcript |
Daily::WebhooksApi | create_webhook | POST /webhooks | /webhooks |
Daily::WebhooksApi | delete_webhook | DELETE /webhooks/id | webhooks/:id |
Daily::WebhooksApi | get_webhook_config | GET /webhooks/id | webhooks/:id |
Daily::WebhooksApi | get_webhooks | GET /webhooks | /webhooks |
Daily::WebhooksApi | update_webhook_config | POST /webhooks/id | webhooks/:id |
Documentation for Models
- Daily::BatchRoomCreateRequest
- Daily::BatchRoomCreateRequestRoomsInner
- Daily::BatchRoomDelete200Response
- Daily::CreateMeetingToken200Response
- Daily::CreateMeetingTokenRequest
- Daily::CreateRoom200Response
- Daily::CreateRoomRequest
- Daily::DailyLiveStreamingOptions
- Daily::DailyLiveStreamingOptionsRtmpUrl
- Daily::DailyStreamingActiveParticipantLayoutConfig
- Daily::DailyStreamingCustomLayoutConfig
- Daily::DailyStreamingCustomLayoutConfigCompositionParams
- Daily::DailyStreamingDefaultLayoutConfig
- Daily::DailyStreamingEndpoint
- Daily::DailyStreamingLayoutConfig
- Daily::DailyStreamingOptions
- Daily::DailyStreamingPortraitLayoutConfig
- Daily::DailyStreamingPortraitLayoutVariant
- Daily::DailyStreamingSingleParticipantLayoutConfig
- Daily::DeleteTranscript200Response
- Daily::Domain
- Daily::DomainProperties
- Daily::Eject200Response
- Daily::EjectRequest
- Daily::GetDomainConfig200Response
- Daily::GetDomainConfig200ResponseConfig
- Daily::GetDomainConfig200ResponseConfigRecordingsBucket
- Daily::GetMeetingInfo200Response
- Daily::GetMeetingInfo200ResponseDataInner
- Daily::GetMeetingInfo200ResponseDataInnerParticipantsInner
- Daily::GetPresence200Response
- Daily::GetPresence200ResponseAIVWWhzHlLHrSdHdw7EWInner
- Daily::GetRecordingInfo200Response
- Daily::GetRecordingInfo200ResponseTracksInner
- Daily::GetRecordingLink200Response
- Daily::GetTranscriptInfo200Response
- Daily::GetTranscriptInfo200ResponseOutParams
- Daily::GetTranscriptLink200Response
- Daily::ListAPILogs200Response
- Daily::ListRecordings200Response
- Daily::ListRecordings200ResponseDataInner
- Daily::ListRooms200Response
- Daily::ListRooms200ResponseDataInner
- Daily::ListRooms200ResponseDataInnerConfig
- Daily::ListTranscript200Response
- Daily::ListTranscript200ResponseDataInner
- Daily::MeetingParticipantsGetRes
- Daily::MeetingParticipantsGetResDataInner
- Daily::MeetingsMeetingGetRes
- Daily::Permissions
- Daily::PermissionsCanAdmin
- Daily::PermissionsCanSend
- Daily::PostWebhook
- Daily::Properties
- Daily::RecordingError
- Daily::RecordingErrorPayload
- Daily::RecordingReadyToDownload
- Daily::RecordingReadyToDownloadPayload
- Daily::RecordingStarted
- Daily::RecordingStartedPayload
- Daily::RecordingStreamingOptions
- Daily::RecordingsBucket
- Daily::RoomProperties
- Daily::RoomPropertiesStreamingEndpointsInner
- Daily::RoomPropertiesStreamingEndpointsInnerHlsConfigVariantsInner
- Daily::RoomsRoomNameGetRes
- Daily::RoomsRoomNamePresenceGetRes
- Daily::RoomsRoomNamePresenceGetResDataInner
- Daily::SendAppMessageRequest
- Daily::SetRoomConfigRequest
- Daily::SetSessionDataRequest
- Daily::StreamingEnded
- Daily::StreamingEndedPayload
- Daily::StreamingError
- Daily::StreamingErrorPayload
- Daily::StreamingStarted
- Daily::StreamingStartedPayload
- Daily::StreamingUpdated
- Daily::StreamingUpdatedPayload
- Daily::TranscriptionBucket
- Daily::TranscriptionProperties
- Daily::TranscriptionPropertiesEndpointing
- Daily::TranscriptionPropertiesRedact
- Daily::UpdatePermissionsRequest
- Daily::UpdatePermissionsRequestDataValue
- Daily::UpdatePermissionsRequestDataValueCanSend
- Daily::UpdateWebhook
- Daily::ValidateMeetingToken200Response
- Daily::Webhook
Documentation for Authorization
Authentication schemes defined for the API:
sec0
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header