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
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
3.3k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
240
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
130
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
840
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.9k
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
380
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
500
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Ethics towards AI in product and experience design
skipperchong
2
320
Producing Creativity
orderedlist
PRO
348
40k
Agile that works and the tools we love
rasmusluckow
331
22k
Balancing Empowerment & Direction
lara
6
1.2k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
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