Overview

unapi
-----

DESCRIPTION

The unapi ruby library is a client library for easily querying and retrieving
resources from web sites that implement the unapi protocol for resource
sharing protocol <http://unapi.info>.

USAGE

  require 'unapi'

  page = UnAPI::Page.new 'http://www.example.com/page_with_unapi_data.html'

  # extract the unapi ids from the page
  ids = page.ids

  # grab a service object from the page
  service = page.service

  # list the formats available from the service
  service.formats.each {|format| puts format.name}

  # list the formats available for a particular id 
  service.formats_for_id('8675309').each {|format| puts format.name}

  # get a particular id in dublin core format
  content = service.get_id_in_format('8675309', 'dc')

TODO

- UnAPI::Page.service_url doesn't properly handle relative paths that
  ../.. in them. It can handle other relative paths just fine, but 
  not ones that walk around the path with ..

AUTHOR

Ed Summers <ehs@pobox.com>


LICENSE

This package is licensed using the Artistic License
<http://www.opensource.org/licenses/artistic-license.php>