December 10, 2015
{
"name": "Matt Banks",
"work": "@OddNetworks",
"role": "Engineer",
"development": [
"JavaScript", "WordPress",
"Xbox One", "iOS"
],
"hobbies": [
"playing with my sons",
"video games", "soccer"
],
"facts": [
"tabs are better than spaces",
"Slack is better than Flowdock"
]
}
REST stands for Representational State Transfer
A REST API provides a way to access, create, modify, and delete data from an external source
Separates the client from the server
CRUD - Create, Read, Update, Delete
otherwise known as PUT, GET, UPDATE, and DELETE
Made to replace the aging, not-so-fun-to-use XML-RPC
Make WordPress a solid application framework
Amazing work from Ryan McCue, Rachel Baker and everyone involved
Infrastructure integrated into Core this week!
Step 1: Upgrade to WordPress 4.4
But you already did that, right?
Step 2: Install the plugin
Step 3: ???
Step 4: Profit
Demo
Install the Client JS plugin to give you helper methods out of the box
Building custom endpoints lets you respond with any data you need
OAuth1 (via plugin)
OAuth is complex, but the plugin is hoping to simplify application management and setup with a full admin UI
Serialized data cannot be read or stored using the REST API
Protected meta (prefixed with an _) cannot be accessed by the API
Most custom fields from plugins aren't immediately visable over the API (but they can be!)
Postman REST Client (Chrome App, Mac App coming soon)
mattbanks.me | @mattbanks | matt@mattbanks.me
github/mattbanks