Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
A Day of REST 2016
Ryan McCue
January 28, 2016
Programming
5
670
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
420
WordCamp Europe 2015
rmccue
1
270
WordCamp Brisbane 2015
rmccue
3
840
WCNYC2014
rmccue
5
310
WCMKE2014
rmccue
5
2.9k
Introduction to Git + Using Git with WordPress
rmccue
8
1.8k
Other Decks in Programming
See All in Programming
(新米)エンジニアリングマネージャーのしごと #RSGT2023
murabayashi
9
5.8k
PHPDocにおける配列の型定義を少し知る
shimabox
1
140
Gradle build: The time is now
nonews
1
470
はてなリモートインターンシップ2022 フロントエンドブートキャンプ 講義資料
hatena
0
120
Milestoner
bkuhlmann
1
240
domain層のモジュール化 / MoT TechTalk #15
mot_techtalk
0
110
あなたと 「|」 したい・・・
track3jyo
PRO
2
1.1k
Qiita Night PHP 2023
fuwasegu
0
11k
10年以上続くプロダクトの フロントエンド刷新プロジェクトのふりかえり
yotahada3
2
340
Functional Data Engineering - A Blueprint for adopting functional principles in data pipeline
vananth22
0
180
Workshop on Jetpack compose
aldefy
0
140
爆速の日経電子版開発の今
shinyaigeek
2
610
Featured
See All Featured
Become a Pro
speakerdeck
PRO
6
3.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
236
1.1M
The Web Native Designer (August 2011)
paulrobertlloyd
76
2.2k
Bootstrapping a Software Product
garrettdimon
299
110k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
24
4.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
217
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
32
1.8k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
13
5.4k
Intergalactic Javascript Robots from Outer Space
tanoku
261
26k
Typedesign – Prime Four
hannesfritz
34
1.5k
Three Pipe Problems
jasonvnalue
89
8.9k
How GitHub (no longer) Works
holman
298
140k
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