Class: Ziggeo
- Inherits:
-
Object
- Object
- Ziggeo
- Defined in:
- lib/Ziggeo.rb
Instance Attribute Summary collapse
-
#api_connect ⇒ Object
Returns the value of attribute api_connect.
-
#cdn_connect ⇒ Object
Returns the value of attribute cdn_connect.
-
#config ⇒ Object
Returns the value of attribute config.
-
#connect ⇒ Object
Returns the value of attribute connect.
-
#encryption_key ⇒ Object
Returns the value of attribute encryption_key.
-
#js_cdn_connect ⇒ Object
Returns the value of attribute js_cdn_connect.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #analytics ⇒ Object
- #application ⇒ Object
- #audios ⇒ Object
- #audioStreams ⇒ Object
- #auth ⇒ Object
- #authtokens ⇒ Object
- #effectProfileProcess ⇒ Object
- #effectProfiles ⇒ Object
-
#initialize(token = nil, private_key = nil, encryption_key = nil) ⇒ Ziggeo
constructor
A new instance of Ziggeo.
- #metaProfileProcess ⇒ Object
- #metaProfiles ⇒ Object
- #streams ⇒ Object
- #videos ⇒ Object
- #webhooks ⇒ Object
Constructor Details
#initialize(token = nil, private_key = nil, encryption_key = nil) ⇒ Ziggeo
Returns a new instance of Ziggeo.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/Ziggeo.rb', line 26 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) js_cdn_url = @config.js_cdn_url js_cdn_regions = @config.js_cdn_regions js_cdn_regions.each do |key, value| if (@token.start_with?(key)) js_cdn_url = value end end @js_cdn_connect = ZiggeoConnect.new(self, js_cdn_url) @auth = nil @videos = nil @streams = nil @audios = nil @audioStreams = 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 |
Instance Attribute Details
#api_connect ⇒ Object
Returns the value of attribute api_connect.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def api_connect @api_connect end |
#cdn_connect ⇒ Object
Returns the value of attribute cdn_connect.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def cdn_connect @cdn_connect end |
#config ⇒ Object
Returns the value of attribute config.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def config @config end |
#connect ⇒ Object
Returns the value of attribute connect.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def connect @connect end |
#encryption_key ⇒ Object
Returns the value of attribute encryption_key.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def encryption_key @encryption_key end |
#js_cdn_connect ⇒ Object
Returns the value of attribute js_cdn_connect.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def js_cdn_connect @js_cdn_connect end |
#private_key ⇒ Object
Returns the value of attribute private_key.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def private_key @private_key end |
#token ⇒ Object
Returns the value of attribute token.
24 25 26 |
# File 'lib/Ziggeo.rb', line 24 def token @token end |
Instance Method Details
#analytics ⇒ Object
146 147 148 149 |
# File 'lib/Ziggeo.rb', line 146 def analytics() @analytics = @analytics || ZiggeoAnalytics.new(self) return @analytics end |
#application ⇒ Object
116 117 118 119 |
# File 'lib/Ziggeo.rb', line 116 def application() @application = @application || ZiggeoApplication.new(self) return @application end |
#audios ⇒ Object
101 102 103 104 |
# File 'lib/Ziggeo.rb', line 101 def audios() @audios = @audios || ZiggeoAudios.new(self) return @audios end |
#audioStreams ⇒ Object
106 107 108 109 |
# File 'lib/Ziggeo.rb', line 106 def audioStreams() @audioStreams = @audioStreams || ZiggeoAudioStreams.new(self) return @audioStreams end |
#auth ⇒ Object
86 87 88 89 |
# File 'lib/Ziggeo.rb', line 86 def auth() @auth = @auth || ZiggeoAuth.new(self) return @auth end |
#authtokens ⇒ Object
111 112 113 114 |
# File 'lib/Ziggeo.rb', line 111 def authtokens() @authtokens = @authtokens || ZiggeoAuthtokens.new(self) return @authtokens end |
#effectProfileProcess ⇒ Object
126 127 128 129 |
# File 'lib/Ziggeo.rb', line 126 def effectProfileProcess() @effectProfileProcess = @effectProfileProcess || ZiggeoEffectProfileProcess.new(self) return @effectProfileProcess end |
#effectProfiles ⇒ Object
121 122 123 124 |
# File 'lib/Ziggeo.rb', line 121 def effectProfiles() @effectProfiles = @effectProfiles || ZiggeoEffectProfiles.new(self) return @effectProfiles end |
#metaProfileProcess ⇒ Object
136 137 138 139 |
# File 'lib/Ziggeo.rb', line 136 def () @metaProfileProcess = @metaProfileProcess || ZiggeoMetaProfileProcess.new(self) return @metaProfileProcess end |
#metaProfiles ⇒ Object
131 132 133 134 |
# File 'lib/Ziggeo.rb', line 131 def () @metaProfiles = @metaProfiles || ZiggeoMetaProfiles.new(self) return @metaProfiles end |
#streams ⇒ Object
96 97 98 99 |
# File 'lib/Ziggeo.rb', line 96 def streams() @streams = @streams || ZiggeoStreams.new(self) return @streams end |
#videos ⇒ Object
91 92 93 94 |
# File 'lib/Ziggeo.rb', line 91 def videos() @videos = @videos || ZiggeoVideos.new(self) return @videos end |
#webhooks ⇒ Object
141 142 143 144 |
# File 'lib/Ziggeo.rb', line 141 def webhooks() @webhooks = @webhooks || ZiggeoWebhooks.new(self) return @webhooks end |