goldfinger/lib/goldfinger.rb

27 lines
706 B
Ruby

require 'goldfinger/request'
require 'goldfinger/link'
require 'goldfinger/result'
require 'goldfinger/utils'
require 'goldfinger/client'
module Goldfinger
class Error < StandardError
end
class NotFoundError < Error
end
class SSLError < Error
end
# Returns result for the Webfinger query
#
# @raise [Goldfinger::NotFoundError] Error raised when the Webfinger resource could not be retrieved
# @raise [Goldfinger::SSLError] Error raised when there was a SSL error when fetching the resource
# @param uri [String] A full resource identifier in the format acct:user@example.com
# @return [Goldfinger::Result]
def self.finger(uri)
Goldfinger::Client.new(uri).finger
end
end