add live meeting in broadcast screen

This commit is contained in:
Bilal
2020-09-14 15:57:38 +03:00
parent 28e0eb36b7
commit de0b12a0e4
12 changed files with 89 additions and 4 deletions

26
lib/daily.rb Normal file
View File

@@ -0,0 +1,26 @@
# frozen_string_literal: true
class Daily
include HTTParty
base_uri 'api.daily.co/v1'
class << self
def create_room
response = post "#{base_uri}/rooms", headers: headers
if response.code != 200
throw StandardError.new('Failed to create a room')
end
response.parsed_response
end
private
def headers
{
'Authorization': "Bearer #{ENV['DAILY_API_TOKEN']}"
}
end
end
end