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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
28
Rails Engines
christopherhein
0
120
Other Decks in Programming
See All in Programming
Nuxt Server Components
wattanx
0
240
Claude Code Skill入門
mayahoney
0
460
PHPで TLSのプロトコルを実装してみる
higaki_program
0
730
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
780
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
110
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
210
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
190
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
130
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
330
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
210
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
660
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Making Projects Easy
brettharned
120
6.6k
Six Lessons from altMBA
skipperchong
29
4.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
So, you think you're a good person
axbom
PRO
2
2k
Paper Plane (Part 1)
katiecoart
PRO
0
6.3k
BBQ
matthewcrist
89
10k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Unsuck your backbone
ammeep
672
58k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
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...