Class: ZabbixApi::Mediatypes

Inherits:
Basic
  • Object
show all
Defined in:
lib/zabbixapi/classes/mediatypes.rb

Instance Method Summary collapse

Methods inherited from Basic

#add, #all, #create, #create_or_update, #delete, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #get_raw, #hash_equals?, #initialize, #key, #keys, #log, #merge_params, #normalize_array, #normalize_hash, #parse_keys, #symbolize_keys, #update

Constructor Details

This class inherits a constructor from ZabbixApi::Basic

Instance Method Details

#default_optionsHash

The default options used when creating MediaType objects via Zabbix API

Returns:

  • (Hash)


20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/zabbixapi/classes/mediatypes.rb', line 20

def default_options
  {
    description: '', # Name
    type: 0, # 0 - Email, 1 - External script, 2 - SMS, 3 - Jabber, 100 - EzTexting
    smtp_server: '',
    smtp_helo: '',
    smtp_email: '', # Email address of Zabbix server
    exec_path: '',  # Name of external script
    gsm_modem: '',  # Serial device name of GSM modem
    username: '', # Jabber user name used by Zabbix server
    passwd: '' # Jabber password used by Zabbix server
  }
end

#indentifyString

The id field name used for identifying specific MediaType objects via Zabbix API

Returns:

  • (String)


13
14
15
# File 'lib/zabbixapi/classes/mediatypes.rb', line 13

def indentify
  'description'
end

#method_nameString

The method name used for interacting with MediaTypes via Zabbix API

Returns:

  • (String)


6
7
8
# File 'lib/zabbixapi/classes/mediatypes.rb', line 6

def method_name
  'mediatype'
end