Giter Club home page Giter Club logo

openlibrary's Introduction

Openlibrary

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

For more information on the REST calls, you can view the api documentation at [here](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 retrieve a book’s Openlibrary listing information.

# just require
require 'openlibrary'

Initiate your search

# create a class proxy
view = Openlibrary::View

# lookup an item with the ISBN-10 or ISBN-13
book_view = view.find_by_isbn("0451526538")

or you can use the other built-in finder methods:

find_by_lccn        # Library of congress catalog number
find_by_oclc        # Worldcat Control Number
find_by_olid        # Openlibrary ID

Extract the book information:

# have a look at the book's info URL on Openlibrary.org
book_view.info_url

# or grab the URL of the book's thumbnail as shown on Openlibrary.org
book_view.thumbnail_url

You can also retrieve a book’s full metadata details.

# create a class proxy
details = Openlibrary::Data

# lookup an item with the ISBN-10 or ISBN-13
book_details = details.find_by_isbn("0451526538")

# have a look at the book's title
book_details.title

# or an array of authors
book_view.authors

TO DO

Write Tests

openlibrary's People

Contributors

jayfajardo avatar

Stargazers

Angus H. avatar Norbert Wójtowicz avatar

Watchers

Norbert Wójtowicz avatar James Cloos 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.