Class: AlertLogic::Client
- Inherits:
-
Object
- Object
- AlertLogic::Client
- Includes:
- RestMethods, Utils
- Defined in:
- lib/alert_logic/client/base_client.rb
Overview
JSON parsing HTTP client with some helper methods
Constant Summary collapse
- DEFAULT_ENDPOINT =
'https://publicapi.alertlogic.net/api/tm/v1/'
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
Instance Method Summary collapse
-
#initialize(secret_key = nil, endpoint = nil) ⇒ Client
constructor
A new instance of Client.
- #reload! ⇒ Object
Methods included from RestMethods
#create, #delete, #get, #list, #post, #put
Constructor Details
#initialize(secret_key = nil, endpoint = nil) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 |
# File 'lib/alert_logic/client/base_client.rb', line 11 def initialize(secret_key = nil, endpoint = nil) @secret_key = secret_key || AlertLogic.secret_key @endpoint = endpoint || DEFAULT_ENDPOINT @logger = AlertLogic.logger init end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
7 8 9 |
# File 'lib/alert_logic/client/base_client.rb', line 7 def endpoint @endpoint end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
7 8 9 |
# File 'lib/alert_logic/client/base_client.rb', line 7 def secret_key @secret_key end |
Instance Method Details
#reload! ⇒ Object
30 31 32 33 |
# File 'lib/alert_logic/client/base_client.rb', line 30 def reload! @connection = nil init end |