Class: Minato::Utils::Client
- Inherits:
-
Object
- Object
- Minato::Utils::Client
- Includes:
- HTTParty
- Defined in:
- lib/minato/utils/client.rb
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
-
#initialize(base_uri:, default_options: {}) ⇒ Client
constructor
A new instance of Client.
- #patch(path, options = {}) ⇒ Object
- #post(path, options = {}) ⇒ Object
- #put(path, options = {}) ⇒ Object
Constructor Details
#initialize(base_uri:, default_options: {}) ⇒ Client
Returns a new instance of Client.
12 13 14 15 |
# File 'lib/minato/utils/client.rb', line 12 def initialize(base_uri:, default_options: {}) @base_uri = base_uri @default_options = end |
Instance Method Details
#delete(path, options = {}) ⇒ Object
33 34 35 |
# File 'lib/minato/utils/client.rb', line 33 def delete(path, = {}) request(:delete, path, ) end |
#get(path, options = {}) ⇒ Object
17 18 19 |
# File 'lib/minato/utils/client.rb', line 17 def get(path, = {}) request(:get, path, ) end |
#patch(path, options = {}) ⇒ Object
29 30 31 |
# File 'lib/minato/utils/client.rb', line 29 def patch(path, = {}) request(:patch, path, ) end |
#post(path, options = {}) ⇒ Object
21 22 23 |
# File 'lib/minato/utils/client.rb', line 21 def post(path, = {}) request(:post, path, ) end |
#put(path, options = {}) ⇒ Object
25 26 27 |
# File 'lib/minato/utils/client.rb', line 25 def put(path, = {}) request(:put, path, ) end |