Class: TridentAssistant::Client
- Inherits:
-
Object
- Object
- TridentAssistant::Client
- Defined in:
- lib/trident_assistant/client.rb
Overview
HTTP client to trident server
Defined Under Namespace
Classes: HttpError, RequestError
Constant Summary collapse
- ENDPOINT =
"https://thetrident.one"
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
Instance Method Summary collapse
- #get(path, **options) ⇒ Object
-
#initialize(**kwargs) ⇒ Client
constructor
A new instance of Client.
- #post(path, **options) ⇒ Object
- #put(path, **options) ⇒ Object
Constructor Details
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
11 12 13 |
# File 'lib/trident_assistant/client.rb', line 11 def endpoint @endpoint end |
Instance Method Details
#get(path, **options) ⇒ Object
17 18 19 |
# File 'lib/trident_assistant/client.rb', line 17 def get(path, **) request(:get, path, **) end |
#post(path, **options) ⇒ Object
21 22 23 |
# File 'lib/trident_assistant/client.rb', line 21 def post(path, **) request(:post, path, **) end |
#put(path, **options) ⇒ Object
25 26 27 |
# File 'lib/trident_assistant/client.rb', line 25 def put(path, **) request(:put, path, **) end |