Sha256: ad5ca64f8178059c2fee998c79b30bf48b571c6390f69f33350769154efbf54e
Contents?: true
Size: 791 Bytes
Versions: 9
Compression:
Stored size: 791 Bytes
Contents
class ZabbixApi class Users < Basic def method_name "user" end def keys "userids" end def key "userid" end def indentify "alias" end def add_medias(data) result = @client.api_request( :method => "user.addMedia", :params => { :users => data[:userids].map { |t| {:userid => t} }, :medias => data[:media] } ) result ? result['mediaids'][0].to_i : nil end def update_medias(data) result = @client.api_request( :method => "user.updateMedia", :params => { :users => data[:userids].map { |t| {:userid => t} }, :medias => data[:media] } ) result ? result['userids'][0].to_i : nil end end end
Version data entries
9 entries across 9 versions & 2 rubygems