Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Grape Presentation

1,389 views

Published on

Published in: Technology, Self Improvement
  • Be the first to comment

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...

×