Class: BasicClient::Base
- Inherits:
-
Object
- Object
- BasicClient::Base
- Defined in:
- lib/basic_client/base.rb
Class Attribute Summary collapse
-
.base_url ⇒ Object
Returns the value of attribute base_url.
Class Method Summary collapse
Instance Method Summary collapse
- #delete(path, params = {}, headers = {}, &block) ⇒ Object
- #get(path, params = {}, headers = {}, &block) ⇒ Object
- #post(path, params = {}, headers = {}, &block) ⇒ Object
- #put(path, params = {}, headers = {}, &block) ⇒ Object
Class Attribute Details
.base_url ⇒ Object
Returns the value of attribute base_url.
7 8 9 |
# File 'lib/basic_client/base.rb', line 7 def base_url @base_url end |
Class Method Details
.with_base(url) ⇒ Object
9 10 11 |
# File 'lib/basic_client/base.rb', line 9 def with_base(url) @base_url = url end |
Instance Method Details
#delete(path, params = {}, headers = {}, &block) ⇒ Object
26 27 28 |
# File 'lib/basic_client/base.rb', line 26 def delete(path, params = {}, headers = {}, &block) request(:delete, path, params, headers, &block) end |
#get(path, params = {}, headers = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/basic_client/base.rb', line 14 def get(path, params = {}, headers = {}, &block) request(:get, path, params, headers, &block) end |
#post(path, params = {}, headers = {}, &block) ⇒ Object
18 19 20 |
# File 'lib/basic_client/base.rb', line 18 def post(path, params = {}, headers = {}, &block) request(:post, path, params, headers, &block) end |
#put(path, params = {}, headers = {}, &block) ⇒ Object
22 23 24 |
# File 'lib/basic_client/base.rb', line 22 def put(path, params = {}, headers = {}, &block) request(:put, path, params, headers, &block) end |