Skip to content

Commit

Permalink
add README
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfajardo committed Sep 2, 2011
1 parent 9948707 commit 7bae9e6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.rdoc
@@ -0,0 +1,36 @@
== Openlibrary


OPENLIBRARY is a simple wrapper for the Openlibrary REST-API.

For more information on the REST calls, you can view the api docuemtation at [http://openlibrary.org/developers/api].


== Installation

The gem is tested against Ruby 1.9.2 and runs smoothly with Rails 3.

gem install openlibrary

or in your Gemfile:

gem 'openlibrary'


== Usage

You can use the +instance+ method to get a proxy-object:

# just require
require 'openlibrary'

# create a client
details = Openlibrary::Details

# lookup an item with the ISBN-10 or ISBN-13
book = details.search{"0451526538")

# have a look at the title of the item
book.title


3 changes: 3 additions & 0 deletions lib/openlibrary.rb
Expand Up @@ -47,6 +47,9 @@ def self.search(key)
book_meta.ebooks = book["ebooks"]
book_meta.pages = book["pages"]
book_meta.weight = book["weight"]

#for debugging purposes
#puts book_meta

book_meta
else
Expand Down

0 comments on commit 7bae9e6

Please sign in to comment.