@coderkevin
https://github.com/coderkevin
Kevin Killingsworth
Follow along: http://bit.do/wp-api-slides
REST API v2
REST API v1
XML-RPC
More info:
A little history...
GET /wp/v2/posts
POST /wp/v2/comments/<id>
Escher?
{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
},
{
"type": "mobile",
"number": "123 456-7890"
}
],
"children": [],
"spouse": null
}
"I believe quite strongly that JavaScript and API-driven interfaces are the future of not just WordPress but the web" -- Matt Mullenweg
REST API (v2)
HTTP
JSON
Browser
JavaScript
External Web App
JSON
JavaScript?
PHP?
Python?
Ruby?
Java?
C/C++?
JSON
Mobile Device
https://github.com/coderkevin
http://bit.do/api-example
WP REST API v2 Docs
Chassis VM
WP Developer Plugin
MDN JavaScript Docs
jQuery Docs
WordPress Code Reference / Codex