Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update Post route endpoint docs to include details on post_meta handling #213

Merged
merged 3 commits into from

2 participants

@rachelbaker
Owner

Add to post route documentation file changes coming to endpoints related to upcoming changes in #207.

@rachelbaker rachelbaker added this to the 1.0 milestone
@rachelbaker rachelbaker self-assigned this
@rmccue rmccue modified the milestone: 1.1, 1.0
@rachelbaker
Owner

@rmccue #reviewmerge

@rachelbaker rachelbaker removed their assignment
@rmccue rmccue was assigned by rachelbaker
@rmccue rmccue merged commit 41a23e6 into master
@rmccue rmccue deleted the post-meta-docs branch
@kellbot kellbot referenced this pull request from a commit in kellbot/WP-API
@rachelbaker rachelbaker Added initial pass at docs for post/id/meta GET and POST routes. Rela…
…tes to #213 and #207.
905940e
@kellbot kellbot referenced this pull request from a commit in kellbot/WP-API
@rachelbaker rachelbaker Added initial pass at docs for post/id/meta/mid GET, PUT and DELETE r…
…outes. Relates to #213 and #207.
f2c250b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 4 deletions.
  1. +10 −4 docs/routes/posts.md
View
14 docs/routes/posts.md
@@ -26,7 +26,7 @@ Content-Type: application/json
The `data` parameter should be an object containing the following key value
pairs:
-* `post_title` - Title of the post. (string) __*required*__
+* `title` - Title of the post. (string) __*required*__
* `content_raw` - Full text of the post. (string) __*required*__
* `excerpt_raw` - Text for excerpt of the post. (string) *optional*
* `name` - Slug of the post. (string) *optional*
@@ -47,7 +47,7 @@ pairs:
* `author` - Author of the post. Author can be provided as a string of the
author's ID or as the User object of the author. Default is current user.
(object \| string) *optional*
-* `password` - Password for protecting the posts. Default is empty string.
+* `password` - Password for protecting the post. Default is empty string.
(string) *optional*
* `post_parent` - Post ID of the post parent. Default is 0. (integer)
*optional*
@@ -63,6 +63,9 @@ pairs:
option 'default_ping_status'. (string) *optional*
* `sticky` - Sticky status for the post: `true` or `false`. Default is
`false`. (boolean) *optional*
+* `post_meta` - Post meta entries of the post. Post meta should be an array
+ of one or more Meta objects for each post meta entry. See the Create Meta
+ for a Post endpoint for the key value pairs. (array) *optional*
### Response
@@ -166,7 +169,7 @@ The `data` parameter should be an object containing the following key value
pairs:
* `ID` - Unique ID of the post. (integer) __*required*__
-* `post_title` - Title of the post. (string) __*required*__
+* `title` - Title of the post. (string) __*required*__
* `content_raw` - Full text of the post. (string) __*required*__
* `excerpt_raw` - Text for excerpt of the post. (string) *optional*
* `name` - Slug of the post. (string) *optional*
@@ -187,7 +190,7 @@ pairs:
* `author` - Author of the post. Author can be provided as a string of the
author's ID or as the User object of the author. Default is current user.
(object \| string) *optional*
-* `password` - Password for protecting the posts. Default is empty string.
+* `password` - Password for protecting the post. Default is empty string.
(string) *optional*
* `post_parent` - Post ID of the post parent. Default is 0. (integer)
*optional*
@@ -203,6 +206,9 @@ pairs:
option 'default_ping_status'. (string) *optional*
* `sticky` - Sticky status for the post: `true` or `false`. Default is
`false`. (boolean) *optional*
+* `post_meta` - Post meta entries of the post. Post meta should be an array
+ of one or more Meta objects for each post meta entry. See the Edit Meta
+ for a Post endpoint for the key value pairs. (array) *optional*
### Response
Something went wrong with that request. Please try again.