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.
10 11 12 |
# File 'lib/netbox_client_ruby/api/secrets/session_key.rb', line 10 def initialize session_key end |
Instance Method Details
#reload ⇒ Object
18 19 20 |
# File 'lib/netbox_client_ruby/api/secrets/session_key.rb', line 18 def reload NetboxClientRuby::Secrets.session_key = request['session_key'] end |
#session_key ⇒ Object
14 15 16 |
# File 'lib/netbox_client_ruby/api/secrets/session_key.rb', line 14 def session_key NetboxClientRuby::Secrets.session_key ||= request['session_key'] end |