Ktistec::WebFinger
A WebFinger client.
Class methods
query(account, *args, **options)
Returns the result of querying for the specified account.
The account should conform to the 'acct' URI Scheme.
w = Ktistec::WebFinger.query("acct:toddsundsted@epiktistes.com") # => #<Ktistec::WebFinger::Result:0x108d...>
w.link("http://webfinger.net/rel/profile-page").href # => "https://epiktistes.com/@toddsundsted"
Raises Ktistec::WebFinger::NotFoundError if the account does not exist and
Ktistec::WebFinger::RedirectionError if redirection fails. Otherwise,
returns Ktistec::WebFinger::Result.
resolve(name)
Resolves the name of a resource to the network IRI of the resource.
Returns the IRI if successful. Raises an error if things go wrong:
Ktistec::HostMeta::Error, Ktistec::WebFinger::Error - the underlying lookup failed
KeyError - a rel="self" link does not exist in the retrieved record
NilAssertionError - the href attribute is blank