Class: S2Netbox::Commands::Authentication
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- S2Netbox::Commands::Authentication
- Includes:
- Helpers
- Defined in:
- lib/s2_netbox/commands/authentication.rb
Class Method Summary collapse
Methods included from Helpers
Methods inherited from ApiRequest
build_command, build_params, command_for_method, command_map, map_attributes, method_missing, provides_command, respond_to_missing?, send_request, supported_operations
Class Method Details
.login ⇒ Object
4 5 6 |
# File 'lib/s2_netbox/commands/authentication.rb', line 4 def self.login S2Netbox.request(S2Netbox::BASIC_ENDPOINT, build_command('Login', {:'USERNAME' => S2Netbox.configuration.username, :'PASSWORD' => S2Netbox.configuration.password})) end |
.logout(session_id) ⇒ Object
8 9 10 |
# File 'lib/s2_netbox/commands/authentication.rb', line 8 def self.logout(session_id) S2Netbox.request(S2Netbox::BASIC_ENDPOINT, build_command('Logout'), session_id) end |