class ApiClient::Connection::Abstract

Attributes

endpoint[RW]
handler[RW]
options[RW]

Public Class Methods

new(endpoint, options = {}) click to toggle source
# File lib/api_client/connection/abstract.rb, line 9
def initialize(endpoint, options = {})
  raise "Cannot instantiate abstract class" if self.class == ApiClient::Connection::Abstract
  @endpoint = endpoint
  @options  = options
  create_handler
end

Public Instance Methods

create_handler() click to toggle source
# File lib/api_client/connection/abstract.rb, line 16
def create_handler
end
delete(path, data = {}, headers = {}) click to toggle source
FS::Connection#delete

Performs a DELETE request Accepts three parameters:

  • path - the path request should go to

  • data - (optional) the query, passed as a hash and converted into query params

  • headers - (optional) headers sent along in the request

# File lib/api_client/connection/abstract.rb, line 71
def delete(path, data = {}, headers = {})
end
get(path, data = {}, headers = {}) click to toggle source
ApiClient::Connection::Abstract#get

Performs a GET request Accepts three parameters:

  • path - the path the request should go to

  • data - (optional) the query, passed as a hash and converted into query params

  • headers - (optional) headers sent along with the request

# File lib/api_client/connection/abstract.rb, line 27
def get(path, data = {}, headers = {})
end
inspect() click to toggle source
# File lib/api_client/connection/abstract.rb, line 74
def inspect
  "#<#{self.class} endpoint: \"#{endpoint}\">"
end
Also aliased as: to_s
patch(path, data = {}, headers = {}) click to toggle source
ApiClient::Connection::Abstract#patch

Performs a PATCH request Accepts three parameters:

  • path - the path request should go to

  • data - (optional) data sent in the request

  • headers - (optional) headers sent along in the request

# File lib/api_client/connection/abstract.rb, line 49
def patch(path, data = {}, headers = {})
end
post(path, data = {}, headers = {}) click to toggle source
ApiClient::Connection::Abstract#post

Performs a POST request Accepts three parameters:

  • path - the path request should go to

  • data - (optional) data sent in the request

  • headers - (optional) headers sent along in the request

# File lib/api_client/connection/abstract.rb, line 38
def post(path, data = {}, headers = {})
end
put(path, data = {}, headers = {}) click to toggle source
ApiClient::Connection::Abstract#put

Performs a PUT request Accepts three parameters:

  • path - the path request should go to

  • data - (optional) data sent in the request

  • headers - (optional) headers sent along in the request

# File lib/api_client/connection/abstract.rb, line 60
def put(path, data = {}, headers = {})
end
to_s()
Alias for: inspect