Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sathish316 committed May 26, 2012
1 parent d2a40b2 commit 1efddf9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -43,17 +43,20 @@ Now you can use finder methods to extract data from a static site
### JSON API (Rack application example)

Scrapify comes with a Rack application called Jsonify which can expose scraped models as JSON.
Rack application example is [here](https://github.com/sathish316/jsonify_rack_example)

In your Rack application map the routes you want to expose using Rack::Builder#map
Check out this [Rack application example](https://github.com/sathish316/jsonify_rack_example) for more details:

https://github.com/sathish316/jsonify_rack_example

In your Rack application map the routes you want to expose as JSON using Rack::Builder#map

```
map '/pizzas' do
run Jsonify.new('/pizzas', ::Pizza)
end
```

This will expose two urls index and show which return JSON:
This will respond to two urls index and show with JSON:

* /pizzas
* /pizzas/:id
Expand Down

0 comments on commit 1efddf9

Please sign in to comment.