module Bespokify::Client::Connection

Public Instance Methods

delete(path, options = {}) click to toggle source
# File lib/bespokify/client/connection.rb, line 20
def delete(path, options = {})
  request :delete, path, options
end
get(path, options = {}) click to toggle source
# File lib/bespokify/client/connection.rb, line 4
def get(path, options = {})
  request :get, path, options
end
patch(path, options = {}) click to toggle source
# File lib/bespokify/client/connection.rb, line 12
def patch(path, options = {})
  request :patch, path, options
end
post(path, options = {}) click to toggle source
# File lib/bespokify/client/connection.rb, line 8
def post(path, options = {})
  request :post, path, options
end
put(path, options = {}) click to toggle source
# File lib/bespokify/client/connection.rb, line 16
def put(path, options = {})
  request :put, path, options
end

Private Instance Methods

request(http_method, path, options) click to toggle source
# File lib/bespokify/client/connection.rb, line 26
def request(http_method, path, options)
  response = self.class.send(http_method, path, body: (options.to_json if options.any?))
  response.parsed_response
end