Module: LinkedIn::RequestHelpers
- Included in:
- Client
- Defined in:
- lib/linked_in/request_helpers.rb
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
- #post(path, body = '', options = {}) ⇒ Object
- #put(path, body, options = {}) ⇒ Object
Instance Method Details
#delete(path, options = {}) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/linked_in/request_helpers.rb', line 27 def delete(path, ={}) path = "/v1#{path}" response = access_token.delete(path, ) raise_errors(response) response end |
#get(path, options = {}) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/linked_in/request_helpers.rb', line 5 def get(path, ={}) path = "/v1#{path}" response = access_token.get(path, ) raise_errors(response) response.body end |
#post(path, body = '', options = {}) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/linked_in/request_helpers.rb', line 12 def post(path, body='', ={}) path = "/v1#{path}" = { 'Content-Type' => 'application/xml' } response = access_token.post(path, body, .merge()) raise_errors(response) response end |
#put(path, body, options = {}) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/linked_in/request_helpers.rb', line 20 def put(path, body, ={}) path = "/v1#{path}" response = access_token.put(path, body, ) raise_errors(response) response end |