Class: CF::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/cf/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Client

Returns a new instance of Client.



8
9
10
11
# File 'lib/cf/client.rb', line 8

def initialize(configuration)
  @configuration = configuration
  @http_client = CF::HTTP::Client.new
end

Instance Method Details

#delete(path, params = {}) ⇒ Object



29
30
31
# File 'lib/cf/client.rb', line 29

def delete(path, params = {})
  request(:delete, path, nil, params)
end

#get(path, params = {}) ⇒ Object



13
14
15
# File 'lib/cf/client.rb', line 13

def get(path, params = {})
  request(:get, path, nil, params)
end

#patch(path, body = nil, params = {}) ⇒ Object



25
26
27
# File 'lib/cf/client.rb', line 25

def patch(path, body = nil, params = {})
  request(:patch, path, body, params)
end

#post(path, body = nil, params = {}) ⇒ Object



17
18
19
# File 'lib/cf/client.rb', line 17

def post(path, body = nil, params = {})
  request(:post, path, body, params)
end

#put(path, body = nil, params = {}) ⇒ Object



21
22
23
# File 'lib/cf/client.rb', line 21

def put(path, body = nil, params = {})
  request(:put, path, body, params)
end