/boogle

boogle is a gem that handle the google books apis hassle

Primary LanguageRubyMIT LicenseMIT

Boogle

Boogle is a gem that takes off your hands from the haslle of dealing with google books APIs

Installation

Add this line to your application's Gemfile:

gem 'boogle'

And then execute:

$ bundle

Or install it yourself as:

$ gem install boogle

Usage

1 - Set the base connection

boogle = Boogle::Client.new(key: 'api_key')

2 - search for books

search by keyword only

boogle.volume.search(keyword: 'flowers')

you can choose to search in specific field by

boogle.volume.search(keyword: 'war', field: 'inauthor', infield: 'Ernest Hemingway') # get all war books written by Ernest Hemingway

here is a list of other fields

3 - get book by id

boogle.volume.find(id: '_oG_iTxP1pIC')

4 - list of books

boogle.volume.list(user_id: '', bookshelf_id: '')

5 - return libarary books

boogle.volume.mylibrary(auth_token: '',  bookshelf_id: '')

6 - remove a book

boogle.volume.remove(auth_token: '', book_id: '', bookshelf_id: '')

7 - Clearing all volumes from my bookshelf

boogle.volume.clear(auth_token: '', bookshelf_id: '')

Dealing with bookshelf

1- list user's bookshelves

boogle.bookshelf.list(user_id: '')

2 - find specific bookshelf

boogle.bookshelf.find(user_id: '', bookshelf_id: '')

3- my libarary bookshelves

boogle.bookshelf.mylibarary(auth_token: '')

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hassantc/boogle. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.