Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Grape APIs
Search
Christopher Hein
December 18, 2012
Programming
2
160
Grape APIs
Christopher Hein
December 18, 2012
Tweet
Share
More Decks by Christopher Hein
See All by Christopher Hein
Controllers and Service Catalog; The Power of CRDs
christopherhein
0
150
Extending Kubernetes with Operators/Controllers
christopherhein
0
25
Rails Engines
christopherhein
0
120
Other Decks in Programming
See All in Programming
AI時代のUIはどこへ行く?
yusukebe
18
9.1k
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
550
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
2.8k
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
350
Ruby Parser progress report 2025
yui_knk
1
460
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
170
楽して成果を出すためのセルフリソース管理
clipnote
0
190
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
速いWebフレームワークを作る
yusukebe
5
1.7k
アセットのコンパイルについて
ojun9
0
130
Improving my own Ruby thereafter
sisshiki1969
1
160
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Visualization
eitanlees
148
16k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Making Projects Easy
brettharned
117
6.4k
Transcript
APIs
Rails
Don’t really fit together.
Sinatra
mmm tasty...
But I’m good programmer... http://threevirtues.com/ (1)
Enter...
Grape 0.2.0!!!
Why@?#$%!
Simple... class API < Grape::API get :users do # omitted
for awesomeness end end
Versions... class API < Grape::API version “v1” get :users do
# omitted for awesomeness end end
Helpers... class API < Grape::API helpers do def current_user User.find
params[:id] end end # omitted for awesomeness end
Multi-file... class API < Grape::API version “v1” mount API_v1 #
omitted for awesomeness end
Describing... class API < Grape::API desc "Returns users", {params:{id: {}}}
get :users do # omitted for awesomeness end end
Demo...