Upstream sync
This commit is contained in:
2
lib/millicast.rb
Normal file
2
lib/millicast.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
require_relative "./millicast/base"
|
||||
require_relative "./millicast/publish_token"
|
||||
14
lib/millicast/base.rb
Normal file
14
lib/millicast/base.rb
Normal 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
|
||||
5
lib/millicast/publish_token.rb
Normal file
5
lib/millicast/publish_token.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module Millicast
|
||||
class PublishToken < Base
|
||||
self.collection_name = "publish_token"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user