Class: Panda::Encoding
- Includes:
- VideoState
- Defined in:
- lib/panda/resources/encoding.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
9 10 11 |
# File 'lib/panda/resources/encoding.rb', line 9 def first EncodingScope.new(self).per_page(1).first end |
Instance Method Details
#cancel ⇒ Object
27 28 29 |
# File 'lib/panda/resources/encoding.rb', line 27 def cancel connection.post("/encodings/#{id}/cancel.json")['canceled'] end |
#retry ⇒ Object
31 32 33 |
# File 'lib/panda/resources/encoding.rb', line 31 def retry connection.post("/encodings/#{id}/retry.json")['retried'] end |
#screenshots ⇒ Object
23 24 25 |
# File 'lib/panda/resources/encoding.rb', line 23 def screenshots ((1..7).map{|i| get_url("#{path}_#{i}.jpg")} if success?) || [] end |
#url ⇒ Object
14 15 16 17 |
# File 'lib/panda/resources/encoding.rb', line 14 def url full_path = "#{path}#{extname}" get_url(full_path) if files.include?(full_path) end |
#urls ⇒ Object
19 20 21 |
# File 'lib/panda/resources/encoding.rb', line 19 def urls files.map {|f| "#{cloud.url}#{f}"} end |