Class: Bcli::Client
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #delete(endpoint) ⇒ Object
- #get(endpoint) ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #patch(endpoint, body) ⇒ Object
- #post(endpoint, body) ⇒ Object
- #put(endpoint, body) ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (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 |