Skip to content
Browse files

readme

  • Loading branch information...
1 parent b2d48ee commit 0a297cd8ec525f24e262a8db4c04a5fad7d5b6ee @dhruvbansal dhruvbansal committed Aug 29, 2012
Showing with 34 additions and 5 deletions.
  1. +33 −4 README.rdoc
  2. +1 −1 innovation_matcher.rb
View
37 README.rdoc
@@ -1,9 +1,38 @@
= 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
+ $ 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
+ $ 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": "http://www.flickr.com/photos/ell-r-brown/6050366599/",
+ "innovator_name": "NICOLAUS OTTO",
+ "innovation_date": "8/14/1877"
+ ...
+
+Retrieve a created match using a given +match_id+
+
+ $ 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": "http://www.flickr.com/photos/ell-r-brown/6050366599/",
+ "innovator_name": "NICOLAUS OTTO",
+ "innovation_date": "8/14/1877",
+ ...
View
2 innovation_matcher.rb
@@ -85,7 +85,7 @@ def pretty_json obj
get "/matches/:uuid" do
uuid = params["uuid"]
- pretty_json(retrieve_match(uuid)
+ pretty_json(retrieve_match(uuid))
end
error 400 do

0 comments on commit 0a297cd

Please sign in to comment.
Something went wrong with that request. Please try again.