Class: TelestreamCloud::Video
- Includes:
- VideoState
- Defined in:
- lib/telestream_cloud/resources/video.rb
Constant Summary
Constants included from Router
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #delete_source ⇒ Object
- #metadata ⇒ Object
- #preview_url(options = {}) ⇒ Object
- #url(options = {}) ⇒ Object
Methods included from VideoState
#fail?, #processing?, #success?
Methods inherited from Resource
#factory, factory, #initialize, method_missing, #reload
Methods included from FactoryConnection
Methods included from Associations
Methods included from Destroyers
Methods inherited from Base
#changed?, #id, #id=, #initialize, #inspect, #new?, #reload, sti_name, #to_json
Methods included from Finders
Methods included from Builders
Methods included from Router
included, #replace_pattern_with_self_variables
Constructor Details
This class inherits a constructor from TelestreamCloud::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class TelestreamCloud::Base
Class Method Details
.first ⇒ Object
7 8 9 |
# File 'lib/telestream_cloud/resources/video.rb', line 7 def first VideoScope.new(self).per_page(1).first end |
Instance Method Details
#delete_source ⇒ Object
16 17 18 |
# File 'lib/telestream_cloud/resources/video.rb', line 16 def delete_source connection.delete("/videos/#{id}/source.json") end |
#metadata ⇒ Object
12 13 14 |
# File 'lib/telestream_cloud/resources/video.rb', line 12 def connection.get("/videos/#{id}/metadata.json") end |
#preview_url(options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/telestream_cloud/resources/video.rb', line 20 def preview_url(={}) = {:https => false} = .merge() get_url("#{path}_1.jpg", [:https]) if success? end |
#url(options = {}) ⇒ Object
26 27 28 29 30 |
# File 'lib/telestream_cloud/resources/video.rb', line 26 def url(={}) = {:https => false} = .merge() get_url("#{path}#{extname}", [:https]) if success? end |