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
620
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
410
WordCamp Europe 2015
rmccue
1
260
WordCamp Brisbane 2015
rmccue
3
770
WCNYC2014
rmccue
5
270
WCMKE2014
rmccue
5
2.8k
Introduction to Git + Using Git with WordPress
rmccue
8
1.7k
Other Decks in Programming
See All in Programming
Micro Frontend Routing – Solutions for mature applications - iJS 04/2022
michaelzikes
0
150
クリエイティブ系のウェブサイト制作で役立つCSS技法 / CSS for develop creative website
clockmaker
2
1.2k
WindowsコンテナDojo:準備編
oniak3ibm
PRO
0
450
Kotlin 最新動向2022 #tfcon #techfeed
ntaro
1
780
JGS594 Lecture 23
javiergs
PRO
0
400
型パラメータが使えるようになったのでLINQを実装してみた
makki_d
2
500
Managing gRPC with Wire
oldergod
2
150
Loom is Blooming
josepaumard
3
510
Where and how to run UI tests (Droidcon Lisbon & Android Makers, Paris)
nonews
0
110
Named Document って何?
harunakano
0
200
Securing Kafka Connect Pipelines with Client-Side Field Level Cryptography @ Kafka Summit London 2022
hpgrahsl
0
300
Becoming an Android Librarian
skydoves
3
410
Featured
See All Featured
A Tale of Four Properties
chriscoyier
149
20k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
119
28k
Documentation Writing (for coders)
carmenhchung
48
2.5k
Bash Introduction
62gerente
596
210k
Code Review Best Practice
trishagee
41
6.7k
Infographics Made Easy
chrislema
233
17k
KATA
mclloyd
7
8.6k
Building Your Own Lightsaber
phodgson
94
4.6k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
Web Components: a chance to create the future
zenorocha
303
40k
Visualization
eitanlees
124
11k
Mobile First: as difficult as doing things right
swwweet
212
7.5k
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