Sha256: fc4c0a56f4b550857058cdb815e21454989699722cc735e495a1d45df8cd14ca

Contents?: true

Size: 1.39 KB

Versions: 5

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 (identify) 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 (identify) 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

5 entries across 5 versions & 2 rubygems

Version Path
zabbixapi_mgx-7.2.1 lib/zabbixapi/basic/basic_alias.rb
zabbixapi_mgx-7.2.0 lib/zabbixapi/basic/basic_alias.rb
zabbixapi_mgx-5.0.0.pre.alpha2 lib/zabbixapi/basic/basic_alias.rb
zabbixapi_mgx-5.0.0.pre.alpha1 lib/zabbixapi/basic/basic_alias.rb
zabbixapi-5.0.0.pre.alpha1 lib/zabbixapi/basic/basic_alias.rb