Compare bikes!
Research bikes!
Open source everything!
BikeBook.io is a single page web application that accesses default bike information through it's own RESTfull JSON API.
This repository contains the web application and also all of the of bike data. All the data is stored in flat files, BikeBook just reads the file you requested.
Simple.
Send a query with field value pairs, get shit back.
There are three main requests you can make:
- Get a list of all the unique model names a manufacturer has produced
- Get a list of models from a manufacturer by year
- Get information about a bike
Send a query with a manufacturer
to BikeBook.io/model_list
So for Heritage cycles, BikeBook.io/model_list?manufacturer=Heritage cycles
Send a query with manufacturer
to BikeBook.io
So for Cinelli, BikeBook.io?manufacturer=Cinelli
If you submit a year in the request, the response is an array of the model names from that year (not wrapped in a hash), eg BikeBook.io?manufacturer=Cinelli&year=2014
For all the manufacturers and all the years, BikeBook.io/assets/index.json
You need to submit three things to get information about a bike: manufacturer
, year
and frame_model
.
So for a Fuji Outland 29 1.1 from 2014,
BikeBook.io?manufacturer=fuji&year=2014&frame_model=Outland 29 1.1
Also, since it's a query string, position of the key doesn't matter, i.e. frame_model
can come first or last.
If we can't find what you've asked for, we return a 404 status error. We might put something fun in the body, we might not, deal with it.
Feel free to make GET requests to BikeBook from your application. We'll send you JSON back, regardless of your domain.
BikeBook.io uses Cross-Origin Resource Sharing (CORS), which allows web applications to make cross domain AJAX calls without using bullshit like JSONP. For more information read this post about CORS (or the spec if you're hardcore).
All the bike data is stored this repository in JSON files. So if you see a mistake or want to update something, do it!
Locally we use rerun to restart the app on changes. Launch the app in development mode with rerun 'rackup'
. You can run the tests with rerun 'rake spec'
(sometimes this breaks and infinitely reloops. Srys.)
Asset compilation with sass --watch assets/styles/style.scss:public/site.css
and coffee -cw -o public/ assets/scripts/site.coffee
, lazy for now.
Every time you change the filesystem you have to refresh the indexes with rake refresh
because, flat files.
Built with all the love by the Bike Index.