Sha256: 445dbfbad9f994064af6aee764d048a660153aa4b125f061ee387b42705ad677

Contents?: true

Size: 914 Bytes

Versions: 1

Compression:

Stored size: 914 Bytes

Contents

module Mugen
  class Jobs < Client
    class << self
    #
    # translate/jobs (GET)
    #
    # Retrieves a list of resources for the most recent jobs filtered
    # by the given parameters.
    #
    def all(options={})
      res = self.get "/translate/jobs", :query => options 
      check_for_errors(res)
      res['response']
    end
    

    #
    # translate/jobs/{id} (GET)
    #
    # Retrieves the group of jobs that were previously submitted
    # together.
    #
    def by_group(id, options={})
      res = self.get "/translate/jobs/#{id}", :query => options 
      check_for_errors(res)
      res['response']
    end            
    
    #
    # translate/jobs (POST)
    #
    # Submits a job or group of jobs to translate.
    #
    def create(options = {})
      res = self.post "/translate/jobs", :body => options
      check_for_errors(res)
      res['response']
    end
   
    end 
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mugen-0.2.1 lib/mugen/jobs.rb