Class: NetboxClientRuby::Secrets::SessionKey
- Inherits:
-
Object
- Object
- NetboxClientRuby::Secrets::SessionKey
- Includes:
- Communication
- Defined in:
- lib/netbox_client_ruby/api/secrets/session_key.rb
Constant Summary collapse
- PATH =
'/api/secrets/get-session-key/'.freeze
Instance Method Summary collapse
-
#initialize ⇒ SessionKey
constructor
A new instance of SessionKey.
- #reload ⇒ Object
- #session_key ⇒ Object
Methods included from Communication
Constructor Details
#initialize ⇒ SessionKey
Returns a new instance of SessionKey.
13 14 15 |
# File 'lib/netbox_client_ruby/api/secrets/session_key.rb', line 13 def initialize session_key end |
Instance Method Details
#reload ⇒ Object
21 22 23 |
# File 'lib/netbox_client_ruby/api/secrets/session_key.rb', line 21 def reload NetboxClientRuby::Secrets.session_key = request['session_key'] end |
#session_key ⇒ Object
17 18 19 |
# File 'lib/netbox_client_ruby/api/secrets/session_key.rb', line 17 def session_key NetboxClientRuby::Secrets.session_key ||= request['session_key'] end |