class Ziggeo
Attributes
api_connect[RW]
cdn_connect[RW]
config[RW]
connect[RW]
encryption_key[RW]
private_key[RW]
token[RW]
Public Class Methods
new(token = nil, private_key = nil, encryption_key = nil)
click to toggle source
# File lib/Ziggeo.rb, line 24 def initialize(token = nil, private_key = nil, encryption_key = nil) @token = token @private_key = private_key @encryption_key = encryption_key @config = ZiggeoConfig.new() server_api_url = @config.server_api_url regions = @config.regions regions.each do |key, value| if (@token.start_with?(key)) server_api_url = value end end @connect = ZiggeoConnect.new(self, server_api_url) api_url = @config.api_url api_regions = @config.api_regions api_regions.each do |key, value| if (@token.start_with?(key)) api_url = value end end @api_connect = ZiggeoConnect.new(self, api_url) cdn_url = @config.cdn_url cdn_regions = @config.cdn_regions cdn_regions.each do |key, value| if (@token.start_with?(key)) cdn_url = value end end @cdn_connect = ZiggeoConnect.new(self, cdn_url) @auth = nil @videos = nil @streams = nil @authtokens = nil @application = nil @effectProfiles = nil @effectProfileProcess = nil @metaProfiles = nil @metaProfileProcess = nil @webhooks = nil @analytics = nil if (ENV["ZIGGEO_URL"] != nil) uri = URI.parse(ENV["ZIGGEO_URL"]) @config.server_api_url = uri.scheme + "://" + uri.host + ":" + uri.port.to_s @token = uri.user @private_key = uri.password query = CGI::parse(uri.query) @encryption_key = query["encryption_key"] end end
Public Instance Methods
analytics()
click to toggle source
# File lib/Ziggeo.rb, line 124 def analytics() @analytics = @analytics || ZiggeoAnalytics.new(self) return @analytics end
application()
click to toggle source
# File lib/Ziggeo.rb, line 94 def application() @application = @application || ZiggeoApplication.new(self) return @application end
auth()
click to toggle source
# File lib/Ziggeo.rb, line 74 def auth() @auth = @auth || ZiggeoAuth.new(self) return @auth end
authtokens()
click to toggle source
# File lib/Ziggeo.rb, line 89 def authtokens() @authtokens = @authtokens || ZiggeoAuthtokens.new(self) return @authtokens end
effectProfileProcess()
click to toggle source
# File lib/Ziggeo.rb, line 104 def effectProfileProcess() @effectProfileProcess = @effectProfileProcess || ZiggeoEffectProfileProcess.new(self) return @effectProfileProcess end
effectProfiles()
click to toggle source
# File lib/Ziggeo.rb, line 99 def effectProfiles() @effectProfiles = @effectProfiles || ZiggeoEffectProfiles.new(self) return @effectProfiles end
metaProfileProcess()
click to toggle source
# File lib/Ziggeo.rb, line 114 def metaProfileProcess() @metaProfileProcess = @metaProfileProcess || ZiggeoMetaProfileProcess.new(self) return @metaProfileProcess end
metaProfiles()
click to toggle source
# File lib/Ziggeo.rb, line 109 def metaProfiles() @metaProfiles = @metaProfiles || ZiggeoMetaProfiles.new(self) return @metaProfiles end
streams()
click to toggle source
# File lib/Ziggeo.rb, line 84 def streams() @streams = @streams || ZiggeoStreams.new(self) return @streams end
videos()
click to toggle source
# File lib/Ziggeo.rb, line 79 def videos() @videos = @videos || ZiggeoVideos.new(self) return @videos end
webhooks()
click to toggle source
# File lib/Ziggeo.rb, line 119 def webhooks() @webhooks = @webhooks || ZiggeoWebhooks.new(self) return @webhooks end