diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-09-20 09:54:07 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-09-20 09:54:07 -0400 |
commit | bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb (patch) | |
tree | 33456f5889d315ad2a520fcd33fe491e612588b4 /plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php | |
parent | akismet 4.0 (diff) | |
download | blogs-gentoo-bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb.tar.gz blogs-gentoo-bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb.tar.bz2 blogs-gentoo-bb31fa2d44dbbe425fa9ce92d4e7be61a1146dfb.zip |
jetpack 5.3
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php')
-rw-r--r-- | plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php index 2db3931a..7747c214 100644 --- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php +++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php @@ -1,4 +1,42 @@ <?php + +new WPCOM_JSON_API_Autosave_Post_v1_1_Endpoint( array( + 'description' => 'Create a post autosave.', + 'group' => '__do_not_document', + 'stat' => 'posts:autosave', + 'min_version' => '1.1', + 'method' => 'POST', + 'path' => '/sites/%s/posts/%d/autosave', + 'path_labels' => array( + '$site' => '(int|string) Site ID or domain', + '$post_ID' => '(int) The post ID', + ), + 'request_format' => array( + 'content' => '(HTML) The post content.', + 'title' => '(HTML) The post title.', + 'excerpt' => '(HTML) The post excerpt.', + ), + 'response_format' => array( + 'ID' => '(int) autodraft post ID', + 'post_ID' => '(int) post ID', + 'preview_URL' => '(string) preview URL for the post', + 'modified' => '(ISO 8601 datetime) modified time', + ), + + 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/1/autosave', + + 'example_request_data' => array( + 'headers' => array( + 'authorization' => 'Bearer YOUR_API_TOKEN' + ), + + 'body' => array( + 'title' => 'Howdy', + 'content' => 'Hello. I am a test post. I was created by the API', + ) + ) +) ); + class WPCOM_JSON_API_Autosave_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_Endpoint { function __construct( $args ) { parent::__construct( $args ); |