From e80fe7a16a59d64220efd5de3b4e9994f1f1f0b6 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Fri, 2 Apr 2021 15:23:52 -0500 Subject: [PATCH] Re-add the Client.logout method (#118) * re-add client logout method - this was inexplicably removed in commit ac4e854d4b34906e8f3919dcad10d52fcba9b65d * re-add client logout method - this was inexplicably removed in commit ac4e854d4b34906e8f3919dcad10d52fcba9b65d Co-authored-by: Dave Parker --- lib/zabbixapi/client.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/zabbixapi/client.rb b/lib/zabbixapi/client.rb index 54d559a..53c6f28 100755 --- a/lib/zabbixapi/client.rb +++ b/lib/zabbixapi/client.rb @@ -41,6 +41,17 @@ def debug? return ! @options || @options[:debug] end + # Log out from the Zabbix Server + # + # @return [Boolean] + # + def logout + api_request( + :method => 'user.logout', + :params => [] + ) + end + # Initializes a new Client object # # @param options [Hash]