Class: Elance::Project

Inherits:
Base
  • Object
show all
Defined in:
lib/elance/project.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #method_missing

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

#create(*params) {|response| ... } ⇒ Object

POST /projects/jobs

Yields:

  • (response)


8
9
10
11
12
13
14
# File 'lib/elance/project.rb', line 8

def create(*params, &block)
  options = {:query => {}}
  options[:query] = params[0] if params.length > 0
  response = self.class.post '/projects/jobs', options
  yield(response) if block_given?
  response
end

#payment(*params) {|response| ... } ⇒ Object

POST /projects/payments

Yields:

  • (response)


17
18
19
20
21
22
23
# File 'lib/elance/project.rb', line 17

def payment(*params, &block)
  options = {:query => {}}
  options[:query] = params[0] if params.length > 0
  response = self.class.post '/projects/jobs', options
  yield(response) if block_given?
  response
end