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
UW Advanced Rails Week 4
Search
Ben Woodall
April 23, 2015
Programming
87
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UW Advanced Rails Week 4
Ben Woodall
April 23, 2015
More Decks by Ben Woodall
See All by Ben Woodall
UW Advanced Rails Week 9
benwoodall
0
69
UW Advanced Rails Week 8
benwoodall
0
72
UW Advanced Rails Week 7
benwoodall
0
73
Week 6
benwoodall
0
79
UW Advanced Rails Week 5
benwoodall
0
82
UW Advanced Rails Week 3
benwoodall
0
93
UW Advanced Rails Week 2
benwoodall
0
250
UW Advanced Rails Week 1
benwoodall
0
130
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
560
AI-Powered Domain-Driven Design
ziobrando
0
410
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
730
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
360
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
290
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
420
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
800
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.6k
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
230
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
GitHub's CSS Performance
jonrohan
1033
470k
Git: the NoSQL Database
bkeepers
PRO
433
67k
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
Designing for Performance
lara
612
70k
A designer walks into a library…
pauljervisheath
211
25k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Fireside Chat
paigeccino
43
4.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530
WENDY [Excerpt]
tessaabrams
14
40k
Transcript
Questions from Week 3? 1
Week 4: Building APIs Spring 2015 2
Why an API? Allow other applications to interface with our
services Useful for data driven development 3
REST API Data Formats JSON JavaScript Object Notation MIME type:
application/json XML Extensible Markup Language MIME type: application/xml and text/xml 4
JSON Example { "shorturl": "lf64kr", "user": { "id": 2, "name":
"benwoodall", "email": "
[email protected]
" }, "array": [1,3,5,7] } 5
XML Example <?xml version="1.0" encoding="UTF-8" ?> <root> <shorturl>lf64kr</shorturl> <user> <id>2</id>
<name>benwoodall</name> <email>
[email protected]
</email> </user> <array>1</array> <array>3</array> <array>5</array> <array>7</array> </root> 6
Building an API in Shortener 7
We need an API end-point to create short urls Requests
should be authenticated against 8 What do we know so far?
Tests 9 spec/controllers/api/v1/links_controller_spec.rb
respond_to 10
respond_to 11
Namespacing 12 config/routes.rb
Namespacing 13 config/routes.rb app/controllers/api/base_controller.rb
Namespacing 14 config/routes.rb app/controllers/api/base_controller.rb app/controllers/api/v1/links_controller.rb
Testing 15 spec/controllers/api/v1/links_controller_spec.rb
Creating a Link 16 app/controllers/api/v1/links_controller.rb
Authenticating 17 app/controllers/api/base_controller.rb
Authenticating 18
Authenticating 19
Authenticating 20 app/models/user.rb
Views 21 app/views/settings/index.html.erb
JBuilder 22 app/views/api/v1/links/show.html.erb
Questions? 23