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
84
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
59
UW Advanced Rails Week 8
benwoodall
0
66
UW Advanced Rails Week 7
benwoodall
0
67
Week 6
benwoodall
0
71
UW Advanced Rails Week 5
benwoodall
0
75
UW Advanced Rails Week 3
benwoodall
0
84
UW Advanced Rails Week 2
benwoodall
0
240
UW Advanced Rails Week 1
benwoodall
0
120
A Bit More Git
benwoodall
1
5.1k
Other Decks in Programming
See All in Programming
Jetpack Compose メカニズム
skydoves
0
460
すこし踏み込む CancellationToken
htkym
2
720
Building an Out-of-Order CPU
latte72
1
790
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
410
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
320
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
140
FreeBSDでZabbixを動かす
kenkino
0
310
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
320
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
430
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
230
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
250
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
YesSQL, Process and Tooling at Scale
rocio
174
15k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Designing Experiences People Love
moore
143
24k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
250
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
430
The Cult of Friendly URLs
andyhume
79
7k
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