Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A simple Ruby wrapper around the developer API
branch: master

This branch is 48 commits behind avdgaag:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Currently a work in progress

A Ruby wrapper around the developers API, that will be made available as a Gem. Currently in alpha stage.

Available operations

Here are the currently working operations:

Bol::Product.find(params[:id])[:query]).limit(10).offset(10).order('sales_ranking ASC')[:query]).page(params[:page])[:id]).search(params[:query])[:id]).top_products[:id]).top_products_overall[:id]).top_products_last_week[:id]).top_products_last_two_months[:id]).new_products[:id]).preorder_products

Here's an overview of all the operations that should still be implemented:[:id]).subcategories
( +


The available operations map almost directly to operations provided by the API to search, load lists of products or load a single product by ID. I do aim to a add a little sugar to make working with Ruby objects a little easier:

  • Add page helper method to combine limit and offset
  • Scope operations by category in a ActiveRecord association style
  • Delay API calls until explicitly requested or triggered by looping over results


  • Add a simple identiy map, so the same product does not have to be loaded twice when requested twice
  • Properly differentiate between product types. Currently built around books; DVDs, music and toys may or may not work as expected.
  • Properly support categories, multiple categories, and category refinements (like "under 5 euro").
  • Add default ordering of products

I do not need this stuff myself, but I will gladly take pull requests for such features.


Bol.configure do |c|
  c.key = 'your public access key'
  c.secret = 'your private secret'
  c.per_page = 10

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


For a full list of changes, please see


Copyright (C) 2011 by Arjan van der Gaag. Published under the MIT license. See for details.

Something went wrong with that request. Please try again.