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
A Day of REST 2016
Search
Ryan McCue
January 28, 2016
Programming
5
810
A Day of REST 2016
"Introduction to the WP REST API" - A brief history of the REST API plugin.
Ryan McCue
January 28, 2016
Tweet
Share
More Decks by Ryan McCue
See All by Ryan McCue
Next Generation WordPress
rmccue
4
440
WordCamp Europe 2015
rmccue
1
330
WordCamp Brisbane 2015
rmccue
3
1.1k
WCNYC2014
rmccue
5
470
WCMKE2014
rmccue
5
3.3k
Introduction to Git + Using Git with WordPress
rmccue
8
1.9k
Other Decks in Programming
See All in Programming
ドメイン駆動設計を実践するために必要なもの
bikisuke
3
310
これからの時代の新標準!SwiftTestingへの移行とトラブルシューティング
uetyo
0
500
快適な開発と高セキュリティを実現するCryptoKitを活用したCoreDataのデータ暗号化術
grandbig
1
320
開発を加速する共有Swift Package実践
elmetal
PRO
0
360
Kotlin 2.0 and Beyond
antonarhipov
2
140
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
240
What is Parser
yui_knk
9
3.7k
ESLint Rule により事業, 技術ドメインに沿った制約と誓約を敷衍させるアプローチのすゝめ
shinyaigeek
1
2.9k
現代のVueとTypeScript - 型安全の活用術
minako__ph
4
3.1k
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
230
Scala におけるコンパイラエラーとの付き合い方
chencmd
2
360
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
380
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
34
1.9k
Scaling GitHub
holman
458
140k
We Have a Design System, Now What?
morganepeng
48
7.1k
How STYLIGHT went responsive
nonsquared
93
5.1k
Agile that works and the tools we love
rasmusluckow
327
20k
Designing for Performance
lara
604
68k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
Testing 201, or: Great Expectations
jmmastey
35
6.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
42
2k
Building Better People: How to give real-time feedback that sticks.
wjessup
359
18k
Code Review Best Practice
trishagee
62
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
88
16k
Transcript
Introduction to the REST API Ryan McCue Senior Engineer at
Human Made
What is the API?
What is the API?
Why is the API? A history of the API
Existing WordPress APIs
XML-RPC Existing APIs & friends Most powerful:
JSON-RPC Existing APIs
Existing APIs
JSON-RPC Existing APIs
admin-ajax Existing APIs & friends Most developer friendly:
RSS Existing APIs & friends Most used:
RSS.js Existing APIs
Existing APIs
RSS.js Existing APIs
The World Wide Web
World Wide Web
None
None
None
None
World Wide Web
None
None
World Wide Web
None
None
WordPress.com API
None
.com API …REST?
None
.com API WordPress.com specifics
None
.com API Inspiration
.com API Unification
Birth of a Plugin
None
JSON
JSON Language Support
None
None
None
JSON Not XML
JSON JSONP
JSON
None
JSON
None
JSON
JSON /**/callback({…
REST
REST Browser Support
REST RPC
REST Challenges
Response Format
Responses Breaking from Core Names
Responses Posts ID => id post_content => content post_name =>
slug
Responses Comments comment_ID => id comment_content => content post_name =>
slug
Responses Terms term_id => id name => name slug =>
slug
Responses Users ID => id display_name => name user_nicename =>
slug
Responses Enveloping
None
Responses $ http demo.wp-api.org/wp-json/v2/wp?_envelope HTTP/1.1 200 OK { "body": {
"name": "WP API Demo", "description": "Just another WordPress site”, "_links": { ... }, "headers": { "Allow": "GET" }, "status": 200 }
Responses HAL
None
Responses JSON Schema
Infrastructure
Infrastructure Request & Response
Infrastructure Separation of Concerns
Infrastructure REST Server vs Rewrites
Problems
Problems It’s New
Problems Meta
Problems Authentication
Bad / Good?
Help Us!
Thanks. speakerdeck.com/rmccue