Class: Elance::Job
Instance Method Summary collapse
-
#all(*params) {|response| ... } ⇒ Object
GET /jobs.
-
#find(job_id) {|response| ... } ⇒ Object
GET /job/job-id.
-
#my(*params) {|response| ... } ⇒ Object
GET /jobs/my.
-
#proposals(job_id) {|response| ... } ⇒ Object
GET /job/job-id/proposals.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Elance::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Elance::Base
Instance Method Details
#all(*params) {|response| ... } ⇒ Object
GET /jobs
8 9 10 11 12 13 14 |
# File 'lib/elance/job.rb', line 8 def all(*params, &block) = {:query => {}} [:query] = params[0] if params.length > 0 response = self.class.get '/jobs', yield(response) if block_given? response end |
#find(job_id) {|response| ... } ⇒ Object
GET /job/job-id
26 27 28 29 30 |
# File 'lib/elance/job.rb', line 26 def find(job_id, &block) response = self.class.get "/jobs/#{job_id}", yield(response) if block_given? response end |
#my(*params) {|response| ... } ⇒ Object
GET /jobs/my
17 18 19 20 21 22 23 |
# File 'lib/elance/job.rb', line 17 def my(*params, &block) = {:query => {}} [:query] = params[0] if params.length > 0 response = self.class.get '/jobs/my', yield(response) if block_given? response end |
#proposals(job_id) {|response| ... } ⇒ Object
GET /job/job-id/proposals
33 34 35 36 37 |
# File 'lib/elance/job.rb', line 33 def proposals(job_id, &block) response = self.class.get "/jobs/#{job_id}/proposals", yield(response) if block_given? response end |