Grape Presentation

1,343 views

Published on

Published in: Technology, Self Improvement
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,343
On SlideShare
0
From Embeds
0
Number of Embeds
213
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Grape Presentation

  1. 1. APIs
  2. 2. Rails
  3. 3. Don’t reallyfit together.
  4. 4. Sinatra
  5. 5. mmm tasty...
  6. 6. But I’m goodprogrammer... http://threevirtues.com/ (1)
  7. 7. Enter...
  8. 8. Grape 0.2.0!!!
  9. 9. Why@?#$%!
  10. 10. Simple...class API < Grape::API get :users do # omitted for awesomeness endend
  11. 11. Versions...class API < Grape::API version “v1” get :users do # omitted for awesomeness endend
  12. 12. Helpers...class API < Grape::API helpers do def current_user User.find params[:id] end end # omitted for awesomenessend
  13. 13. Multi-file...class API < Grape::API version “v1” mount API_v1 # omitted for awesomenessend
  14. 14. Describing...class API < Grape::API desc "Returns users", {params:{id: {}}} get :users do # omitted for awesomeness endend
  15. 15. Demo...

×