Class: Bcli::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/bcli/client.rb

Direct Known Subclasses

FileClient

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



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

def initialize
  @config = Bcli::Config.new
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/bcli/client.rb', line 7

def config
  @config
end

Instance Method Details

#delete(endpoint) ⇒ Object



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

def delete(endpoint)
  self.class.delete(endpoint, headers: headers)
end

#get(endpoint) ⇒ Object



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

def get(endpoint)
  self.class.get(endpoint, headers: headers)
end

#patch(endpoint, body) ⇒ Object



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

def patch(endpoint, body)
  self.class.patch(endpoint, headers: headers, body: body.to_json)
end

#post(endpoint, body) ⇒ Object



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

def post(endpoint, body)
  self.class.post(endpoint, headers: headers, body: body.to_json)
end

#put(endpoint, body) ⇒ Object



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

def put(endpoint, body)
  self.class.put(endpoint, headers: headers, body: body.to_json)
end