Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Grape APIs
Search
Christopher Hein
December 18, 2012
Programming
170
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Grape APIs
Christopher Hein
December 18, 2012
Transcript
15 slides
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...
More Decks by Christopher Hein
See All by Christopher Hein
Controllers and Service Catalog; The Power of CRDs
christopherhein
0
170
Extending Kubernetes with Operators/Controllers
christopherhein
0
42
Rails Engines
christopherhein
0
150
Other Decks in Programming
See All in Programming
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
740
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
490
あなたはMCPの機能を、まだ知らない。
4geru
1
680
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
250
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
320
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
270
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
380
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
AI-Powered Domain-Driven Design
ziobrando
0
470
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
680
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Become a Pro
speakerdeck
PRO
31
6.4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
How to train your dragon (web standard)
notwaldorf
96
6.9k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Limits of Empathy - UXLibs8
cassininazir
2
790
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Speed Design
sergeychernyshev
33
2.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
570