Module: Mavenlink::APIOperations::Request::ClassMethods
- Defined in:
- lib/mavenlink/api_operations/request.rb
Instance Method Summary collapse
Instance Method Details
#get(path, params = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/mavenlink/api_operations/request.rb', line 7 def get(path, params = {}) api_base = Mavenlink.api_base api_key = Mavenlink.api_key = { query: params, headers: { Authorization: "Bearer #{api_key}", }, } HTTParty.get("#{api_base}#{path}", ) end |
#post(path, params = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mavenlink/api_operations/request.rb', line 19 def post(path, params = {}) api_base = Mavenlink.api_base api_key = Mavenlink.api_key = { body: params, headers: { Authorization: "Bearer #{api_key}", }, } HTTParty.post("#{api_base}#{path}", ) end |