The barx gem provides XRI resolution libraries for use in other applications.

The basic API is as follows:

require 'barx'
xri = XriParser::AuthorityParser.parse(QXRI)
inputs = XriResolver::ParseInputParameters.new(params_hash)
xrds = XriResolver::AuthorityResolver.resolve(xri, inputs)

In the above example, QXRI refers to qxri as defined in section 7 of <www.oasis-open.org/committees/download.php/25741/xri-resolution-v2.0-wd-11-ed-06.pdf>, and params_hash is a Ruby hash of the keys and values in the Query String part of the QXRI or the relevant HTTP Accept header.

See examples/README for more information. There is also a full featured XRI proxy resolver, barx-proxy, available at <rubyforge.org/projects/barx/>.

Author contact information and more examples are available at <xrisoft.org>.