Class: Mugen::Jobs
Class Method Summary collapse
-
.all(options = {}) ⇒ Object
translate/jobs (GET).
-
.by_group(id, options = {}) ⇒ Object
translate/jobs/id (GET).
-
.create(options = {}) ⇒ Object
translate/jobs (POST).
Methods inherited from Client
before_get, before_post, before_put, check_for_errors
Class Method Details
.all(options = {}) ⇒ Object
translate/jobs (GET)
Retrieves a list of resources for the most recent jobs filtered by the given parameters.
10 11 12 13 14 |
# File 'lib/mugen/jobs.rb', line 10 def all(={}) res = self.get "/translate/jobs", :query => check_for_errors(res) res['response'] end |
.by_group(id, options = {}) ⇒ Object
translate/jobs/id (GET)
Retrieves the group of jobs that were previously submitted together.
23 24 25 26 27 |
# File 'lib/mugen/jobs.rb', line 23 def by_group(id, ={}) res = self.get "/translate/jobs/#{id}", :query => check_for_errors(res) res['response'] end |
.create(options = {}) ⇒ Object
translate/jobs (POST)
Submits a job or group of jobs to translate.
34 35 36 37 38 |
# File 'lib/mugen/jobs.rb', line 34 def create( = {}) res = self.post "/translate/jobs", :body => check_for_errors(res) res['response'] end |