Skip to content

Instantly share code, notes, and snippets.

@maxcutler
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxcutler/e22b2f6ba50e157b260f to your computer and use it in GitHub Desktop.
Save maxcutler/e22b2f6ba50e157b260f to your computer and use it in GitHub Desktop.
WP-API Changes
{
"site": {
"name": "My WordPress Site",
"description": "...",
"URL": "http://example.com"
},
"collections": {
"post_types": {
"supports": ["HEAD", "GET"],
"params": [],
"meta": {
"links": {
"self": "http://example.com/wp-api/post_types/"
}
}
},
"posts": {
"supports": ["HEAD", "GET", "POST"],
"params": ["page", "filter", "type"],
"meta": {
"links": {
"self": "http://example.com/wp-api/posts/"
}
}
},
"taxonomies": {
"supports": ["HEAD", "GET"],
"params": [],
"meta": {
"links": {
"self": "http://example.com/wp-api/taxonomies/"
}
}
},
"users": {
"supports": ["HEAD", "GET"],
"params": ["page", "filter"],
"meta": {
"links": {
"self": "http://example.com/wp-api/users/"
}
}
}
},
"meta": {
"links": {
"help": "https://github.com/WP-API/WP-API",
"profile": "https://raw.github.com/rmccue/WP-API/master/docs/schema.json"
}
}
}
{
"posts": [
{
"ID": 1,
"title": "Hello World",
...
"meta": {
"links": {
"self": "http://example.com/wp-api/posts/1/",
"collections": {
"comments": {
"self": "http://example.com/wp-api/posts/1/comments/",
"params": ["page", "filter"],
"supports": ["HEAD", "GET", "POST"]
},
"terms": {
"self": "http://example.com/wp-api/posts/1/terms",
"params": ["page", "filter", "taxonomy"],
"supports": ["HEAD", "GET", "POST"]
},
"revisions": {
"self": "http://example.com/wp-api/posts/1/revisions/",
"params": [],
"supports": ["HEAD", "GET"]
}
},
"actions": {
"domagic": "http://example.com/wp-api/posts/1/domagic",
}
}
}
}
],
"meta": {
"links": {
"self": "http://example.com/wp-api/posts/",
"next": "http://example.com/wp-api/posts/?page=2&type=post"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment