Upstream sync

This commit is contained in:
Senad Uka
2020-08-20 06:50:51 +02:00
parent 190ff2854b
commit 41bf88e358
127 changed files with 1399 additions and 565 deletions

2
lib/millicast.rb Normal file
View File

@@ -0,0 +1,2 @@
require_relative "./millicast/base"
require_relative "./millicast/publish_token"

14
lib/millicast/base.rb Normal file
View File

@@ -0,0 +1,14 @@
module Millicast
class Base < ActiveResource::Base
self.site = 'https://api.millicast.com/api'
self.connection.auth_type = :bearer
self.connection.bearer_token = ENV.fetch("MILLICAST_API_SECRET")
self.include_format_in_path = false
def self.enable_logging
ActiveSupport::Notifications.subscribe('request.active_resource') do |name, start, finish, id, payload|
puts payload
end
end
end
end

View File

@@ -0,0 +1,5 @@
module Millicast
class PublishToken < Base
self.collection_name = "publish_token"
end
end