Class: ZabbixApi::Users
- Inherits:
-
Basic
- Object
- Basic
- ZabbixApi::Users
show all
- Defined in:
- lib/zabbixapi/classes/users.rb
Instance Method Summary
collapse
Methods inherited from Basic
#add, #all, #create, #create_or_update, #default_options, #delete, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #hash_equals?, #initialize, #log, #merge_params, #normalize_hash, #parse_keys, #symbolize_keys, #update
Instance Method Details
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/zabbixapi/classes/users.rb', line 20
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
|
#indentify ⇒ Object
16
17
18
|
# File 'lib/zabbixapi/classes/users.rb', line 16
def indentify
"alias"
end
|
#key ⇒ Object
12
13
14
|
# File 'lib/zabbixapi/classes/users.rb', line 12
def key
"userid"
end
|
#keys ⇒ Object
8
9
10
|
# File 'lib/zabbixapi/classes/users.rb', line 8
def keys
"userids"
end
|
#method_name ⇒ Object
4
5
6
|
# File 'lib/zabbixapi/classes/users.rb', line 4
def method_name
"user"
end
|