Giter VIP home page Giter VIP logo

xrd's Introduction

XRD

Homepage
http://code.google.com/p/ruby-xrd/
Author
Bob Aman
Copyright
Copyright © 2010 Google, Inc.
License
Apache 2.0

Description

An XRD parser for Ruby.

Example Usage

require 'xrd'
xrd = XRD.fetch_and_parse(
  'http://www.google.com/s2/webfinger/?q=acct%3Agooglebuzz%40gmail.com'
)
xrd.subject
# => #<Addressable::URI:0x80fb3864 URI:acct:[email protected]>
xrd.aliases
# => [#<Addressable::URI:0x80fb3224 URI:http://www.google.com/profiles/googlebuzz>]
xrd.links(:media_type => 'application/atom+xml')
# => [#<XRD::Link:0x80fbc11c HREF:https://www.googleapis.com/buzz/v1/activities/111062888259659218284/@public>]
xrd.links(:rel => 'describedby')
# => [
#   #<XRD::Link:0x80fbd224 HREF:http://www.google.com/profiles/googlebuzz>,
#   #<XRD::Link:0x80fbc914 HREF:http://www.google.com/s2/webfinger/?q=acct%3Agooglebuzz%40gmail.com&fmt=foaf>
# ]
xrd.links(:rel => 'describedby', :media_type => 'text/html')
# => [#<XRD::Link:0x80fbd224 HREF:http://www.google.com/profiles/googlebuzz>]

Install

  • sudo gem install xrd

xrd's People

Stargazers

Angus H. avatar Maxwell Salzberg avatar Ilya Grigorik avatar Bob Aman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.