Class: Panda::Video
- Includes:
- VideoState
- Defined in:
- lib/panda/resources/video.rb
Constant Summary
Constants included from Router
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods included from VideoState
#fail?, #processing?, #success?
Methods inherited from Resource
#cloud, cloud, #initialize, method_missing, #reload
Methods included from CloudConnection
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 Panda::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Panda::Base
Class Method Details
.first ⇒ Object
7 8 9 |
# File 'lib/panda/resources/video.rb', line 7 def first VideoScope.new(self).per_page(1).first end |
Instance Method Details
#metadata ⇒ Object
12 13 14 |
# File 'lib/panda/resources/video.rb', line 12 def connection.get("/videos/#{id}/metadata.json") end |
#preview_url(options = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/panda/resources/video.rb', line 16 def preview_url(={}) = {:https => false} = .merge() get_url("#{path}_1.jpg", [:https]) if success? end |
#url(options = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/panda/resources/video.rb', line 22 def url(={}) = {:https => false} = .merge() get_url("#{path}#{extname}", [:https]) if success? end |