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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Christopher Hein
December 18, 2012
Programming
160
2
Share
Grape APIs
Christopher Hein
December 18, 2012
More Decks by Christopher Hein
See All by Christopher Hein
Controllers and Service Catalog; The Power of CRDs
christopherhein
0
160
Extending Kubernetes with Operators/Controllers
christopherhein
0
30
Rails Engines
christopherhein
0
130
Other Decks in Programming
See All in Programming
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
420
今さら聞けないCancellationToken
htkym
0
200
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.3k
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.2k
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.2k
net-httpのHTTP/2対応について
naruse
0
350
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
320
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
190
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
520
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
11
3k
GitHub Copilot CLIのいいところ
htkym
2
1.2k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
210
Rails Girls Zürich Keynote
gr2m
96
14k
Marketing to machines
jonoalderson
1
5.3k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
940
Speed Design
sergeychernyshev
33
1.8k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
エンジニアに許された特別な時間の終わり
watany
107
240k
Navigating Team Friction
lara
192
16k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
270
Exploring anti-patterns in Rails
aemeredith
3
380
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...