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
UW Advanced Rails Week 4
Search
Ben Woodall
April 23, 2015
Programming
79
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
49
UW Advanced Rails Week 8
benwoodall
0
60
UW Advanced Rails Week 7
benwoodall
0
56
Week 6
benwoodall
0
63
UW Advanced Rails Week 5
benwoodall
0
69
UW Advanced Rails Week 3
benwoodall
0
79
UW Advanced Rails Week 2
benwoodall
0
220
UW Advanced Rails Week 1
benwoodall
0
110
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
240
自作OSでスライド発表する
uyuki234
1
3.7k
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
300
どこまでゆるくて許されるのか
tk3fftk
0
450
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
200
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
390
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
500
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
290
Performance Engineering for Everyone
elenatanasoiu
0
260
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Being A Developer After 40
akosma
91
590k
Paper Plane
katiecoart
PRO
1
52k
Docker and Python
trallard
47
3.9k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Faster Mobile Websites
deanohume
310
32k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Ethics towards AI in product and experience design
skipperchong
2
320
Code Reviewing Like a Champion
maltzj
528
40k
Become a Pro
speakerdeck
PRO
31
6k
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