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.
-
#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
- #audio_streams ⇒ Object
- #audios ⇒ 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 |
# 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) @auth = nil @videos = nil @streams = nil @audios = nil @audio_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 |
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 |
#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
138 139 140 141 |
# File 'lib/Ziggeo.rb', line 138 def analytics() @analytics = @analytics || ZiggeoAnalytics.new(self) return @analytics end |
#application ⇒ Object
108 109 110 111 |
# File 'lib/Ziggeo.rb', line 108 def application() @application = @application || ZiggeoApplication.new(self) return @application end |
#audio_streams ⇒ Object
98 99 100 101 |
# File 'lib/Ziggeo.rb', line 98 def audio_streams() @audio_streams = @audio_streams || ZiggeoAudio_streams.new(self) return @audio_streams end |
#audios ⇒ Object
93 94 95 96 |
# File 'lib/Ziggeo.rb', line 93 def audios() @audios = @audios || ZiggeoAudios.new(self) return @audios end |
#auth ⇒ Object
78 79 80 81 |
# File 'lib/Ziggeo.rb', line 78 def auth() @auth = @auth || ZiggeoAuth.new(self) return @auth end |
#authtokens ⇒ Object
103 104 105 106 |
# File 'lib/Ziggeo.rb', line 103 def authtokens() @authtokens = @authtokens || ZiggeoAuthtokens.new(self) return @authtokens end |
#effectProfileProcess ⇒ Object
118 119 120 121 |
# File 'lib/Ziggeo.rb', line 118 def effectProfileProcess() @effectProfileProcess = @effectProfileProcess || ZiggeoEffectProfileProcess.new(self) return @effectProfileProcess end |
#effectProfiles ⇒ Object
113 114 115 116 |
# File 'lib/Ziggeo.rb', line 113 def effectProfiles() @effectProfiles = @effectProfiles || ZiggeoEffectProfiles.new(self) return @effectProfiles end |
#metaProfileProcess ⇒ Object
128 129 130 131 |
# File 'lib/Ziggeo.rb', line 128 def () @metaProfileProcess = @metaProfileProcess || ZiggeoMetaProfileProcess.new(self) return @metaProfileProcess end |
#metaProfiles ⇒ Object
123 124 125 126 |
# File 'lib/Ziggeo.rb', line 123 def () @metaProfiles = @metaProfiles || ZiggeoMetaProfiles.new(self) return @metaProfiles end |
#streams ⇒ Object
88 89 90 91 |
# File 'lib/Ziggeo.rb', line 88 def streams() @streams = @streams || ZiggeoStreams.new(self) return @streams end |
#videos ⇒ Object
83 84 85 86 |
# File 'lib/Ziggeo.rb', line 83 def videos() @videos = @videos || ZiggeoVideos.new(self) return @videos end |
#webhooks ⇒ Object
133 134 135 136 |
# File 'lib/Ziggeo.rb', line 133 def webhooks() @webhooks = @webhooks || ZiggeoWebhooks.new(self) return @webhooks end |