goldfinger/README.md

34 lines
1.2 KiB
Markdown
Raw Normal View History

2016-02-17 16:25:35 +01:00
Goldfinger, a Webfinger client for Ruby
=======================================
2016-02-17 16:36:19 +01:00
[![Gem Version](http://img.shields.io/gem/v/goldfinger.svg)][gem]
2017-05-09 14:57:48 +02:00
[![Build Status](http://img.shields.io/travis/tootsuite/goldfinger.svg)][travis]
[![Dependency Status](http://img.shields.io/gemnasium/tootsuite/goldfinger.svg)][gemnasium]
2016-02-17 16:36:19 +01:00
[gem]: https://rubygems.org/gems/goldfinger
2017-05-09 14:57:48 +02:00
[travis]: https://travis-ci.org/tootsuite/goldfinger
[gemnasium]: https://gemnasium.com/tootsuite/goldfinger
2016-02-17 16:36:19 +01:00
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, or `Goldfinger::SSLError` if something is wrong with the HTTPS connection it uses.
2016-02-17 16:25:35 +01:00
## Installation
gem install goldfinger
## Usage
data = Goldfinger.finger('acct:gargron@quitter.no')
data.link('http://schemas.google.com/g/2010#updates-from').href
2016-02-17 16:25:35 +01:00
# => "https://quitter.no/api/statuses/user_timeline/7477.atom"
2016-02-17 16:36:19 +01:00
data.aliases
# => ["https://quitter.no/user/7477", "https://quitter.no/gargron"]
data.subject
# => "acct:gargron@quitter.no"
2016-02-17 16:36:19 +01:00
## RFC support
The official Webfinger RFC is [7033](https://tools.ietf.org/html/rfc7033).