Method: CrowdFlower::Job.create

Defined in:
lib/crowdflower/job.rb

.create(title) ⇒ Object

Creates a new empty Job in CrowdFlower.



41
42
43
44
45
46
# File 'lib/crowdflower/job.rb', line 41

def self.create(title)
  connect
  res = self.post("#{resource_uri}.json", :query => {:job => {:title => title } }, :headers => { "Content-Length" => "0" } )
  verify_response res
  self.new(res["id"], nil, res)
end