Class: ApiSixClient::Base
- Inherits:
-
Object
- Object
- ApiSixClient::Base
- Defined in:
- lib/api_six_client/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
Instance Method Summary collapse
- #delete(path, params = {}, headers = {}) ⇒ Object
- #get(path, params = {}, headers = {}) ⇒ Object
-
#initialize(endpoint: nil, auth_token: nil, debug_mode: false, dm: false) ⇒ Base
constructor
A new instance of Base.
- #patch(path, params = {}, headers = {}) ⇒ Object
- #post(path, params = {}, headers = {}) ⇒ Object
- #put(path, params = {}, headers = {}) ⇒ Object
Constructor Details
#initialize(endpoint: nil, auth_token: nil, debug_mode: false, dm: false) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 |
# File 'lib/api_six_client/base.rb', line 10 def initialize(endpoint: nil, auth_token: nil, debug_mode: false, dm: false) @endpoint = endpoint @auth_token = auth_token @debug_mode = debug_mode || dm override_defaults validate_config! end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
8 9 10 |
# File 'lib/api_six_client/base.rb', line 8 def endpoint @endpoint end |
Instance Method Details
#delete(path, params = {}, headers = {}) ⇒ Object
35 36 37 |
# File 'lib/api_six_client/base.rb', line 35 def delete(path, params = {}, headers = {}) request __method__, path, params, headers end |
#get(path, params = {}, headers = {}) ⇒ Object
23 24 25 |
# File 'lib/api_six_client/base.rb', line 23 def get(path, params = {}, headers = {}) request __method__, path, params, headers end |
#patch(path, params = {}, headers = {}) ⇒ Object
27 28 29 |
# File 'lib/api_six_client/base.rb', line 27 def patch(path, params = {}, headers = {}) request __method__, path, params, headers end |
#post(path, params = {}, headers = {}) ⇒ Object
19 20 21 |
# File 'lib/api_six_client/base.rb', line 19 def post(path, params = {}, headers = {}) request __method__, path, params, headers end |
#put(path, params = {}, headers = {}) ⇒ Object
31 32 33 |
# File 'lib/api_six_client/base.rb', line 31 def put(path, params = {}, headers = {}) request __method__, path, params, headers end |