module RestInterface
Wrapper around rest-client
Private Instance Methods
delete(path = {})
click to toggle source
# File lib/zeus/api_client/rest_interface.rb, line 37 def delete(path = {}) RestClient.delete "#{@endpoint}#{path}" end
get(path, params = {})
click to toggle source
# File lib/zeus/api_client/rest_interface.rb, line 24 def get(path, params = {}) RestClient.get "#{@endpoint}#{path}", params: params end
post(path, data = {})
click to toggle source
# File lib/zeus/api_client/rest_interface.rb, line 28 def post(path, data = {}) RestClient.post "#{@endpoint}#{path}", data.to_json, content_type: :json, accept: :json end
put(path, params = {})
click to toggle source
# File lib/zeus/api_client/rest_interface.rb, line 33 def put(path, params = {}) RestClient.put "#{@endpoint}#{path}", params: params end