gisbn Ruby GEM

The best way to sell yourself and get exposer as a new developer is contributing to open source projects either writing own libraries as well as tools or contributing to someone else project. I always love to contribute Open Source projects not for selling myself or getting exposer point of view rather I would like to give something back to community. I personally believe that today I came here because of the community supports. As a part of it, I started extracting source code from all of my pet projects and exporting them as a very nice library that other developer can use in their projects. Recently, I published one Ruby Gem: gisbn based on Google Book API.
gisbn: https://rubygems.org/gems/gisbn

gisbn
Basically, it fetches book information from Google Book by API by thirteen or ten digit ISBN number. Lets say, you have the ISBN number and you want to see all the information about that book. This GEM will help you fetch all information about that book.

Couple of years back, when I was in Bangladesh I started a startup www.wherearemybooks.com. Wherearemybooks.com is a platform for student, where students can cell, lend and borrow books from another students. One of core features of the application is fetching book information by book’s ISBN number. I had to write a library by myself what fetches information from Google Book API. The whole library I published as a Ruby GEM.

Code examples by the GEM

book = Gisbn::Book.new "0262033844", "AIzaSyDKepjfaVBRcgsnPALw5s2UNyfOk-1FHUU", "ca" ##create an account at Google and get API Kyes
 
 
book.title
#=> "Introduction to Algorithms"
 
book.description
#=> "A new edition of the essential text and professional reference, with substantial new material on such topics as vEB trees, multithreaded algorithms, dynamic programming, and edge-baseflow."
 
book.publisher
#=> "MIT Press"
 
book.published_date
#=> <Date: 2001-02-03 ...>
 
book.isbn_10
#=> 0262033844
 
book.isbn_13
#=> 9780262033848
 
book.thumbnail
#=> http://books.google.com/books/content?id=i-bUBQAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api
 
book.preview
#=> http://books.google.ca/books?id=i-bUBQAAQBAJ&printsec=frontcover&dq=isbn:0262033844&hl=&cd=1&source=gbs_api
 
 
book.gisbn.isbn = 9780321573513
book.fetch.title  => "Algorithms"

gisbn exposes following methods:

title                >> Returns Book's title as string
description          >> Returns the description of book as string
isbn(isbn_number)    >> Set new isbn
fetch                >> Call to Google Book API and process book information on provided ISBN
authors              >> Return authors' name as comma separated as string
authors_as_array     >> Return authors' name as ruby array. If no book is associated with ISBN number,
                        then it return empty array
publisher            >> Return publisher name as string
isbn_10              >> Return 10 digit ISBN numbers as string
isbn_13              >> Return 13 digit ISBN numbers as string
categories           >> Return category names as comma separated as string
categories_as_array  >> Return category names as ruby array. If no book is associated with ISBN number,
                        then it return empty array
thumbnail_small      >> Return the link of small thumnail
thumbnail            >> Return the link of standard thumnail
preview_link         >> Return the link for previewing the book
page_count           >> Return page count as integer
published_date       >> Return the published date as Ruby object

If you want to contribute and enrich the GEM, you are really welcome, Just visit and fork from my github: https://github.com/eftakhairul/gisbn

Happy hacking 🙂

 

Eftakhairul Islam

Hi, I'm Eftakhairul Islam, a passionate Software Engineer, Hacker and Open Source Enthusiast. I enjoy writing about technical things, work in a couple of startup as a technical advisor and in my spare time, I contribute a lot of open source projects.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Read previous post:
Setting up development enviroment with Vagrant

Nowadays we have to work on different different web stacks at the same time. Even in same web stack our...

Close