Sha256: f75a7ddf9da62990e813861b922789780c3abef067176287ecf7a05deefc5626
Contents?: true
Size: 976 Bytes
Versions: 2
Compression:
Stored size: 976 Bytes
Contents
# Copyright © 2014, Evercam. module Evercam module Vendors # This method returns a list of all vendors in Evercam. 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 # 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. 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 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
evercam-0.1.2 | lib/evercam/vendors.rb |
evercam-0.1.1 | lib/evercam/vendors.rb |