Skip to content
An API to match Facebook users with Innovations.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
log
tmp
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.rdoc
Rakefile
config.ru
innovation_matcher.rb
settings.example.yml
unicorn-conf.example.rb

README.rdoc

Installation & Running

$ git clone https://github.com/infochimps/chiat_day_innovation_matcher.git
$ cd chiat_day_innovation_matcher
$ bundle install
$ RACK_ENV=development ruby innovation_matcher.rb

Usage

Create a match

Returns an array of innovations matching given parameters dob and hometown. Also returns a match_id that can be used to retrieve this match later.

Example:

$ curl -s -X POST http://localhost:4567/matches -d '{"dob": "1983-05-23", "hometown": "New York, NY"}'
{
  "match_id": "6b73f010-d469-012f-ad21-002219342852",
  "innovations": [
    {

“id”: “280”, “type”: “Automotive”, “name”: “internal combustion engine”, “photo”: “www.flickr.com/photos/ell-r-brown/6050366599/”, “innovator_name”: “NICOLAUS OTTO”, “innovation_date”: “8/14/1877”

...

Retrieve a match

Returns an array of innovations from a previously returned match_id.

Example:

$ curl -s -X GET http://localhost:4567/matches/6b73f010-d469-012f-ad21-002219342852
{
  "match_id": "6b73f010-d469-012f-ad21-002219342852",
  "innovations": [
    {

“id”: “280”, “type”: “Automotive”, “name”: “internal combustion engine”, “photo”: “www.flickr.com/photos/ell-r-brown/6050366599/”, “innovator_name”: “NICOLAUS OTTO”, “innovation_date”: “8/14/1877”,

...
Something went wrong with that request. Please try again.