lib/demandbase.rb in demandbase-0.1.1 vs lib/demandbase.rb in demandbase-0.1.2

- old
+ new

@@ -1,21 +1,24 @@ require 'json' +require 'mocha/setup' require 'public_suffix' require 'rest_client' +require 'demandbase/error' require 'demandbase/record' module Demandbase class << self - def lookup_domain(domain) - 'Stanford University' - end - def lookup_ip(ip) - 'Stanford University' - end - - def lookup(domain_or_ip) - 'Stanford University' + # Look up a Demandbase record for a given domain name. + # + # Returns a Demandbase::Record if the record is found; nil otherwise. + # + # Raises a Demandbase::RTIDNotSetError if a RTID key is not set. + # Raises a Demandbase::ParseError if the domain doesn't look legit. + # Raises a Demandbase::ServerError if the Demandbase server is unresponsive. + # + def lookup(domain) + Demandbase::Record.new(domain) end end end \ No newline at end of file