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
Understanding Ruby Grammar Through Conflicts
yui_knk
1
110
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
930
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
940
オホーツクでコミュニティを立ち上げた理由―地方出身プログラマの挑戦 / TechRAMEN 2025 Conference
lemonade_37
2
470
ワープロって実は計算機で
pepepper
2
1.3k
A Gopher's Guide to Vibe Coding
danicat
0
150
AIのメモリー
watany
13
1.5k
Reactの歴史を振り返る
tutinoko
1
180
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
600
LLMは麻雀を知らなすぎるから俺が教育してやる
po3rin
3
2.1k
Understanding Kotlin Multiplatform
l2hyunwoo
0
260
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
How to Ace a Technical Interview
jacobian
278
23k
For a Future-Friendly Web
brad_frost
179
9.9k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Writing Fast Ruby
sferik
628
62k
Raft: Consensus for Rubyists
vanstee
140
7.1k
The Cult of Friendly URLs
andyhume
79
6.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Music & Morning Musume
bryan
46
6.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.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...