Sha256: 7ba2b4703dc9d2fb4439da36e3176a71ca5ccc0ae0501d109e9b6c52b70765f8

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

class ZabbixApi
  class Basic
    # Get Zabbix object data from API by id
    #
    # @param data [Hash] Should include object's id field name (indentify) and id value
    # @raise [ApiError] Error returned when there is a problem with the Zabbix API call.
    # @raise [HttpError] Error raised when HTTP status from Zabbix Server response is not a 200 OK.
    # @return [Hash]
    def get(data)
      get_full_data(data)
    end

    # Add new Zabbix object using API create
    #
    # @param data [Hash]
    # @raise [ApiError] Error returned when there is a problem with the Zabbix API call.
    # @raise [HttpError] Error raised when HTTP status from Zabbix Server response is not a 200 OK.
    # @return [Integer] The object id if a single object is created
    # @return [Boolean] True/False if multiple objects are created
    def add(data)
      create(data)
    end

    # Destroy Zabbix object using API delete
    #
    # @param data [Hash] Should include object's id field name (indentify) and id value
    # @raise [ApiError] Error returned when there is a problem with the Zabbix API call.
    # @raise [HttpError] Error raised when HTTP status from Zabbix Server response is not a 200 OK.
    # @return [Integer] The object id if a single object is deleted
    # @return [Boolean] True/False if multiple objects are deleted
    def destroy(data)
      delete(data)
    end

    def method_name; end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zabbixapi-4.2.0 lib/zabbixapi/basic/basic_alias.rb
zabbixapi-4.1.2 lib/zabbixapi/basic/basic_alias.rb
zabbixapi-4.1.1 lib/zabbixapi/basic/basic_alias.rb
zabbixapi-4.1.0 lib/zabbixapi/basic/basic_alias.rb
zabbixapi-4.0.0 lib/zabbixapi/basic/basic_alias.rb
zabbixapi-3.2.1 lib/zabbixapi/basic/basic_alias.rb