Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.571 kb
class FingerData
def initialize(xrd)
@xrd = xrd
end
def url
@xrd.links.find { |l| l['rel'] == 'http://schemas.google.com/g/2010#updates-from' }.to_s
end
def public_key
public_key_href = @xrd.links.find { |l| l['rel'].downcase == 'magic-public-key' }.href
public_key_href[/^.*?,(.*)$/,1]
end
def salmon_url
@xrd.links.find { |l| l['rel'].downcase == 'salmon' }.href
end
end
class QueriesWebFinger
def self.query(email)
# XXX: ensure caching of finger lookup.
xrd = Redfinger.finger(email)
FingerData.new(xrd)
end
end
Jump to Line
Something went wrong with that request. Please try again.