mirror of https://github.com/mastodon/goldfinger
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() |
4 years ago | |
---|---|---|
.github/workflows | 4 years ago | |
lib | 5 years ago | |
spec | 6 years ago | |
.gitignore | 7 years ago | |
.rspec | 7 years ago | |
.rubocop.yml | 6 years ago | |
.ruby-version | 6 years ago | |
.travis.yml | 6 years ago | |
Gemfile | 7 years ago | |
Gemfile.lock | 4 years ago | |
LICENSE | 8 years ago | |
README.md | 4 years ago | |
Rakefile | 8 years ago | |
goldfinger.gemspec | 4 years ago |
README.md
Goldfinger, a WebFinger client for Ruby
A WebFinger client for Ruby. Supports application/xrd+xml
and application/jrd+json
responses. Raises Goldfinger::NotFoundError
on failure to fetch the Webfinger or XRD data, can also raise HTTP:Error
or OpenSSL::SSL::SSLError
if something is wrong with the HTTPS connection it uses.
- Does not fall back to HTTP if HTTPS is not available
- Does check host-meta XRD, but only if the standard WebFinger path yielded no result
Installation
gem install goldfinger
Usage
data = Goldfinger.finger('acct:gargron@quitter.no')
data.link('http://schemas.google.com/g/2010#updates-from').href
# => "https://quitter.no/api/statuses/user_timeline/7477.atom"
data.aliases
# => ["https://quitter.no/user/7477", "https://quitter.no/gargron"]
data.subject
# => "acct:gargron@quitter.no"
RFC support
The official WebFinger RFC is 7033.