Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An API to match Facebook users with Innovations.
Ruby
tree: 7ff9ee44d3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Gemfile
Gemfile.lock
LICENSE
Procfile
README.rdoc
Rakefile
innovation_matcher.rb
settings.example.yml

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.