Sha256: 4b55125f17762e98609d55c29e946365d89654320fc941434e8511d61a361500
Contents?: true
Size: 887 Bytes
Versions: 11
Compression:
Stored size: 887 Bytes
Contents
class ZabbixApi class Usermacros < Basic def indentify "macro" end def method_name "usermacro" end def create(data) request(data, "usermacro.create", "hostmacroids") end def create_global(data) request(data, "usermacro.createglobal", "globalmacroids") end def delete(data) request(data, "usermacro.delete", "hostmacroids") end def delete_global(data) request(data, "usermacro.deleteglobal", "globalmacroids") end def update request(data, "usermacro.update", "hostmacroids") end def update_global request(data, "usermacro.updateglobal", "globalmacroids") end private def request(data, method, result_key) result = @client.api_request(:method => method, :params => data) result.empty? ? nil : result[result_key][0].to_i end end end
Version data entries
11 entries across 11 versions & 2 rubygems