Class: Ankoder::Download

Inherits:
Base
  • Object
show all
Defined in:
lib/ankoder/download.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #errors

Class Method Summary collapse

Methods inherited from Base

count, destroy, #destroy, destroy_all, disconnect!, establish_connection!, find, #id, #include_ankoder_object, #initialize, method_missing, #method_missing, #new_record?, path, path=, #reload, #save, #save!, session, session=, update, #update_attributes

Constructor Details

This class inherits a constructor from Ankoder::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ankoder::Base

Class Method Details

.create(attributes = {}) ⇒ Object

Download file from the given URL

Download.create('url' => 'http://host.com/file.avi', :postback_url => 'http://your_own_host.com/postback/download')

the return result would be the Video record that you can save for further checking

if the postback url is included, the download result will send back to your server in JSON format


11
12
13
14
# File 'lib/ankoder/download.rb', line 11

def self.create(attributes={})
  download = super
  return download 
end