module WebFinger::Client
Overview
The client.
Defined in:
web_finger/client.crConstant Summary
-
ACCOUNT_REGEX =
/\ ^https:\/\/(?<host>[^\/]+)(\/.*)?$| ^([^@]+)@(?<host>[^@]+)$| ^(?<host>.+)$ /mx
Class Method Summary
-
.query(account, attempts = 10)
Returns the result of querying for the specified account.
Class Method Detail
def self.query(account, attempts = 10)
#
Returns the result of querying for the specified account.
The account should conform to the 'acct' URI Scheme. Liberal validation of this format eases federation with other popular servers.
w = WebFinger.query("acct:[email protected]") # => #<WebFinger::Result:0x108d...>
w.link("http://webfinger.net/rel/profile-page").href # => "https://epiktistes.com/@toddsundsted"
Raises WebFinger::NotFoundError
if the account does not exist
and WebFinger::RedirectionError
if redirection failed.
Otherwise, returns WebFinger::Result
.