Class: UploadJuicer::Job

Inherits:
Object
  • Object
show all
Defined in:
lib/upload_juicer.rb

Class Method Summary collapse

Class Method Details

.info(api_key, id) ⇒ Object



17
18
19
20
# File 'lib/upload_juicer.rb', line 17

def self.info(api_key, id)
  JSON.parse(RestClient.get("#{UploadJuicer::API_URL}/#{id}?token=#{api_key}&gem=#{UploadJuicer::VERSION}",
    { :content_type => :json, :accept => :json }))
end

.submit(api_key, url, outputs) ⇒ Object



12
13
14
15
# File 'lib/upload_juicer.rb', line 12

def self.submit(api_key, url, outputs)
  JSON.parse(RestClient.post("#{UploadJuicer::API_URL}?token=#{api_key}&gem=#{UploadJuicer::VERSION}", 
    { :url => url, :outputs => outputs }.to_json, { :content_type => :json, :accept => :json }))
end