Class: Elance::Freelancer
Instance Method Summary collapse
-
#find(user_id) {|response| ... } ⇒ Object
GET /contractors/user-id.
-
#my(*params) {|response| ... } ⇒ Object
GET /contractors/my.
-
#search(*params) {|response| ... } ⇒ Object
GET /contractors.
-
#watchlist(*params) {|response| ... } ⇒ Object
GET /contractors/watchlist.
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
#find(user_id) {|response| ... } ⇒ Object
GET /contractors/user-id
35 36 37 38 39 |
# File 'lib/elance/freelancer.rb', line 35 def find(user_id, &block) response = self.class.get "/contractors/#{user_id}" yield(response) if block_given? response end |
#my(*params) {|response| ... } ⇒ Object
GET /contractors/my
17 18 19 20 21 22 23 |
# File 'lib/elance/freelancer.rb', line 17 def my(*params, &block) = {:query => {}} [:query] = params[0] if params.length > 0 response = self.class.get "/contractors/my", yield(response) if block_given? response end |
#search(*params) {|response| ... } ⇒ Object
GET /contractors
8 9 10 11 12 13 14 |
# File 'lib/elance/freelancer.rb', line 8 def search(*params, &block) = {:query => {}} [:query] = params[0] if params.length > 0 response = self.class.get "/contractors/#{keywords.join(', ')}", yield(response) if block_given? response end |
#watchlist(*params) {|response| ... } ⇒ Object
GET /contractors/watchlist
26 27 28 29 30 31 32 |
# File 'lib/elance/freelancer.rb', line 26 def watchlist(*params, &block) = {:query => {}} [:query] = params[0] if params.length > 0 response = self.class.get "/contractors/watchlist", yield(response) if block_given? response end |