module Evercam::Vendors

Public Instance Methods

get_all_vendors() click to toggle source

This method returns a list of all vendors in Evercam.

# File lib/evercam/vendors.rb, line 6
def get_all_vendors
   data = handle_response(call("/vendors"))
   if !data.include?("vendors")
      message = "Invalid response received from server."
      @logger.error message
      raise EvercamError.new(message)
   end
   data["vendors"]
end
get_vendors_by_mac(mac_prefix) click to toggle source

This method returns a list of vendors that match a specified MAC address prefix.

Parameters

mac_prefix

The MAC address prefix to use in the vendor search.

# File lib/evercam/vendors.rb, line 21
def get_vendors_by_mac(mac_prefix)
   data = handle_response(call("/vendors/#{mac_prefix}"))
   if !data.include?("vendors")
      message = "Invalid response received from server."
      @logger.error message
      raise EvercamError.new(message)
   end
   data["vendors"]
end