Changeset 40116
- Timestamp:
- 02/24/2017 10:33:05 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 5 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
- Property svn:mergeinfo changed
/trunk merged: 40058,40061,40065-40066,40077,40104
- Property svn:mergeinfo changed
-
branches/4.7/Gruntfile.js
r39195 r40116 440 440 cmd: 'phpunit', 441 441 args: ['-c', 'phpunit.xml.dist', '--group', 'external-http'] 442 }, 443 'restapi-jsclient': { 444 cmd: 'phpunit', 445 args: ['-c', 'phpunit.xml.dist', '--group', 'restapi-jsclient'] 442 446 } 443 447 }, … … 671 675 'jshint:core', 672 676 'jshint:media' 677 ] ); 678 679 grunt.registerTask( 'restapi-jsclient', [ 680 'phpunit:restapi-jsclient', 681 'qunit:compiled' 673 682 ] ); 674 683 -
branches/4.7/tests/phpunit/includes/bootstrap.php
r39086 r40116 19 19 global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer, $wp_theme_directories; 20 20 21 if ( !is_readable( $config_file_path ) ) { 22 die( "ERROR: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n" ); 21 if ( ! is_readable( $config_file_path ) ) { 22 echo "ERROR: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n"; 23 exit( 1 ); 23 24 } 24 25 require_once $config_file_path; -
branches/4.7/tests/phpunit/tests/rest-api/rest-post-meta-fields.php
r39437 r40116 11 11 */ 12 12 class WP_Test_REST_Post_Meta_Fields extends WP_Test_REST_TestCase { 13 protected static $wp_meta_keys_saved; 13 14 protected static $post_id; 14 15 15 16 public static function wpSetUpBeforeClass( $factory ) { 17 self::$wp_meta_keys_saved = $GLOBALS['wp_meta_keys']; 16 18 self::$post_id = $factory->post->create(); 17 19 } 18 20 19 21 public static function wpTearDownAfterClass() { 22 $GLOBALS['wp_meta_keys'] = self::$wp_meta_keys_saved; 20 23 wp_delete_post( self::$post_id, true ); 21 24 } -
branches/4.7/tests/phpunit/tests/rest-api/rest-schema-setup.php
r40058 r40116 37 37 $this->assertTrue( is_array( $routes ), '`get_routes` should return an array.' ); 38 38 $this->assertTrue( ! empty( $routes ), 'Routes should not be empty.' ); 39 40 $routes = array_filter( array_keys( $routes ), array( $this, 'is_builtin_route' ) ); 39 41 40 42 $expected_routes = array( … … 71 73 ); 72 74 73 $this->assertEquals( $expected_routes, array_keys( $routes ) ); 75 $this->assertEquals( $expected_routes, $routes ); 76 } 77 78 private function is_builtin_route( $route ) { 79 return ( 80 '/' === $route || 81 preg_match( '#^/oembed/1\.0(/.+)?$#', $route ) || 82 preg_match( '#^/wp/v2(/.+)?$#', $route ) 83 ); 74 84 } 75 85 76 86 public function test_build_wp_api_client_fixtures() { 77 // Set up for testing the individual endpoints. 78 // Set a current admin user. 79 $administrator = $this->factory->user->create( array( 80 'role' => 'administrator', 81 ) ); 82 wp_set_current_user( $administrator ); 83 84 // Set up data for endpoints. 85 $post_id = $this->factory->post->create(); 86 $page_id = $this->factory->post->create( array( 'post_type' => 'page' ) ); 87 $tag_id = $this->factory->tag->create( array( 'name' => 'test' ) ); 87 // Set up data for individual endpoint responses. We need to specify 88 // lots of different fields on these objects, otherwise the generated 89 // fixture file will be different between runs of PHPUnit tests, which 90 // is not desirable. 91 92 $administrator_id = $this->factory->user->create( array( 93 'role' => 'administrator', 94 'display_name' => 'REST API Client Fixture: User', 95 'user_nicename' => 'restapiclientfixtureuser', 96 'user_email' => 'administrator@example.org', 97 ) ); 98 wp_set_current_user( $administrator_id ); 99 100 $post_id = $this->factory->post->create( array( 101 'post_name' => 'restapi-client-fixture-post', 102 'post_title' => 'REST API Client Fixture: Post', 103 'post_content' => 'REST API Client Fixture: Post', 104 'post_excerpt' => 'REST API Client Fixture: Post', 105 'post_author' => 0, 106 ) ); 107 wp_update_post( array( 108 'ID' => $post_id, 109 'post_content' => 'Updated post content.', 110 ) ); 111 112 $page_id = $this->factory->post->create( array( 113 'post_type' => 'page', 114 'post_name' => 'restapi-client-fixture-page', 115 'post_title' => 'REST API Client Fixture: Page', 116 'post_content' => 'REST API Client Fixture: Page', 117 'post_excerpt' => 'REST API Client Fixture: Page', 118 'post_date' => '2017-02-14 00:00:00', 119 'post_date_gmt' => '2017-02-14 00:00:00', 120 'post_author' => 0, 121 ) ); 122 wp_update_post( array( 123 'ID' => $page_id, 124 'post_content' => 'Updated page content.', 125 ) ); 126 127 $tag_id = $this->factory->tag->create( array( 128 'name' => 'REST API Client Fixture: Tag', 129 'slug' => 'restapi-client-fixture-tag', 130 'description' => 'REST API Client Fixture: Tag', 131 ) ); 132 88 133 $media_id = $this->factory->attachment->create_object( '/tmp/canola.jpg', 0, array( 89 134 'post_mime_type' => 'image/jpeg', 90 135 'post_excerpt' => 'A sample caption', 91 ) ); 92 wp_update_post( array( 'post_content' => 'Updated content.', 'ID' => $post_id ) ); 93 wp_update_post( array( 'post_content' => 'Updated content.', 'ID' => $page_id ) ); 136 'post_name' => 'restapi-client-fixture-attachment', 137 'post_title' => 'REST API Client Fixture: Attachment', 138 'post_date' => '2017-02-14 00:00:00', 139 'post_date_gmt' => '2017-02-14 00:00:00', 140 'post_author' => 0, 141 ) ); 142 94 143 $comment_id = $this->factory->comment->create( array( 95 'comment_approved' => 1, 96 'comment_post_ID' => $post_id, 97 'user_id' => 0, 144 'comment_approved' => 1, 145 'comment_post_ID' => $post_id, 146 'user_id' => 0, 147 'comment_date' => '2017-02-14 00:00:00', 148 'comment_date_gmt' => '2017-02-14 00:00:00', 149 'comment_author' => 'Internet of something or other', 150 'comment_author_email' => 'lights@example.org', 151 'comment_author_url' => 'http://lights.example.org/', 98 152 ) ); 99 153 … … 197 251 ), 198 252 array( 199 'route' => '/wp/v2/users/ 1',253 'route' => '/wp/v2/users/' . $administrator_id, 200 254 'name' => 'UserModel', 201 255 ), … … 218 272 ); 219 273 220 // Set up the mocked response and tell jshint to ignore the single quote json objects 221 $mocked_responses = "/*jshint -W109 */\n\nvar mockedApiResponse = {};\n\n"; 222 $mocked_responses .= "/**\n"; 274 $mocked_responses = "/**\n"; 223 275 $mocked_responses .= " * DO NOT EDIT\n"; 224 276 $mocked_responses .= " * Auto-generated by test_build_wp_api_client_fixtures\n"; 225 277 $mocked_responses .= " */\n"; 278 $mocked_responses .= "var mockedApiResponse = {};\n"; 279 $mocked_responses .= "/* jshint -W109 */\n"; 226 280 227 281 foreach ( $routes_to_generate_data as $route ) { … … 232 286 $this->assertTrue( ! empty( $data ), $route['name'] . ' route should return data.' ); 233 287 234 $mocked_responses .= 'mockedApiResponse.' . $route['name'] . ' = ' . wp_json_encode( $data ) . ";\n\n"; 288 if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) { 289 $fixture = $this->normalize_fixture( $data, $route['name'] ); 290 $mocked_responses .= "\nmockedApiResponse." . $route['name'] . ' = ' 291 . json_encode( $fixture, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) 292 . ";\n"; 293 } 235 294 } 236 295 237 // Save the route object for QUnit tests. 238 $file = './tests/qunit/fixtures/wp-api-generated.js'; 239 file_put_contents( $file, $mocked_responses ); 296 if ( is_multisite() ) { 297 echo "Skipping generation of API client fixtures in multisite mode.\n"; 298 } else if ( version_compare( PHP_VERSION, '5.4', '<' ) ) { 299 echo "Skipping generation of API client fixtures due to unsupported JSON_* constants.\n"; 300 } else { 301 // Save the route object for QUnit tests. 302 $file = './tests/qunit/fixtures/wp-api-generated.js'; 303 file_put_contents( $file, $mocked_responses ); 304 } 240 305 241 306 // Clean up our test data. … … 246 311 wp_delete_comment( $comment_id ); 247 312 } 313 314 /** 315 * This array contains normalized versions of object IDs and other values 316 * that can change depending on how PHPUnit is executed. For details on 317 * how they were generated, see #39264. 318 */ 319 private static $fixture_replacements = array( 320 'PostsCollection.0.id' => 3, 321 'PostsCollection.0.guid.rendered' => 'http://example.org/?p=3', 322 'PostsCollection.0.link' => 'http://example.org/?p=3', 323 'PostsCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3', 324 'PostsCollection.0._links.replies.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=3', 325 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3/revisions', 326 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3', 327 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcategories&post=3', 328 'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Ftags&post=3', 329 'PostModel.id' => 3, 330 'PostModel.guid.rendered' => 'http://example.org/?p=3', 331 'PostModel.link' => 'http://example.org/?p=3', 332 'postRevisions.0.author' => '2', 333 'postRevisions.0.id' => 4, 334 'postRevisions.0.parent' => 3, 335 'postRevisions.0.slug' => '3-revision-v1', 336 'postRevisions.0.guid.rendered' => 'http://example.org/?p=4', 337 'postRevisions.0._links.parent.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3', 338 'PagesCollection.0.id' => 5, 339 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=5', 340 'PagesCollection.0.link' => 'http://example.org/?page_id=5', 341 'PagesCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/pages/5', 342 'PagesCollection.0._links.replies.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=5', 343 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/?rest_route=/wp/v2/pages/5/revisions', 344 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5', 345 'PageModel.id' => 5, 346 'PageModel.guid.rendered' => 'http://example.org/?page_id=5', 347 'PageModel.link' => 'http://example.org/?page_id=5', 348 'pageRevisions.0.author' => '2', 349 'pageRevisions.0.id' => 6, 350 'pageRevisions.0.parent' => 5, 351 'pageRevisions.0.slug' => '5-revision-v1', 352 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=6', 353 'pageRevisions.0._links.parent.0.href' => 'http://example.org/?rest_route=/wp/v2/pages/5', 354 'MediaCollection.0.id' => 7, 355 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=7', 356 'MediaCollection.0.link' => 'http://example.org/?attachment_id=7', 357 'MediaCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/media/7', 358 'MediaCollection.0._links.replies.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=7', 359 'MediaModel.id' => 7, 360 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=7', 361 'MediaModel.link' => 'http://example.org/?attachment_id=7', 362 'TagsCollection.0.id' => 2, 363 'TagsCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/tags/2', 364 'TagsCollection.0._links.wp:post_type.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fposts&tags=2', 365 'TagModel.id' => 2, 366 'UsersCollection.1.id' => 2, 367 'UsersCollection.1.link' => 'http://example.org/?author=2', 368 'UsersCollection.1._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/users/2', 369 'UserModel.id' => 2, 370 'UserModel.link' => 'http://example.org/?author=2', 371 'me.id' => 2, 372 'me.link' => 'http://example.org/?author=2', 373 'CommentsCollection.0.id' => 2, 374 'CommentsCollection.0.post' => 3, 375 'CommentsCollection.0.link' => 'http://example.org/?p=3#comment-2', 376 'CommentsCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/comments/2', 377 'CommentsCollection.0._links.up.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3', 378 ); 379 380 private function normalize_fixture( $data, $path ) { 381 if ( isset( self::$fixture_replacements[ $path ] ) ) { 382 return self::$fixture_replacements[ $path ]; 383 } 384 385 if ( ! is_array( $data ) ) { 386 return $data; 387 } 388 389 foreach ( $data as $key => $value ) { 390 if ( is_string( $value ) && ( 391 'date' === $key || 392 'date_gmt' === $key || 393 'modified' === $key || 394 'modified_gmt' === $key 395 ) ) { 396 $data[ $key ] = '2017-02-14T00:00:00'; 397 } else { 398 $data[ $key ] = $this->normalize_fixture( $value, "$path.$key" ); 399 } 400 } 401 402 return $data; 403 } 248 404 } -
branches/4.7/tests/qunit/fixtures/wp-api-generated.js
r40058 r40116 1 /*jshint -W109 */2 3 var mockedApiResponse = {};4 5 1 /** 6 2 * DO NOT EDIT 7 3 * Auto-generated by test_build_wp_api_client_fixtures 8 4 */ 9 mockedApiResponse.Schema = {"name":"Test Blog","description":"Just another WordPress site","url":"http:\/\/example.org","home":"http:\/\/example.org","namespaces":["oembed\/1.0","wp\/v2"],"authentication":[],"routes":{"\/":{"namespace":"","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/"}},"\/oembed\/1.0":{"namespace":"oembed\/1.0","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"namespace":{"required":false,"default":"oembed\/1.0"},"context":{"required":false,"default":"view"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/oembed\/1.0"}},"\/oembed\/1.0\/embed":{"namespace":"oembed\/1.0","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"url":{"required":true},"format":{"required":false,"default":"json"},"maxwidth":{"required":false,"default":600}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/oembed\/1.0\/embed"}},"\/wp\/v2":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"namespace":{"required":false,"default":"wp\/v2"},"context":{"required":false,"default":"view"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2"}},"\/wp\/v2\/posts":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"after":{"required":false,"description":"Limit response to posts published after a given ISO8601 compliant date.","type":"string"},"author":{"required":false,"default":[],"description":"Limit result set to posts assigned to specific authors.","type":"array","items":{"type":"integer"}},"author_exclude":{"required":false,"default":[],"description":"Ensure result set excludes posts assigned to specific authors.","type":"array","items":{"type":"integer"}},"before":{"required":false,"description":"Limit response to posts published before a given ISO8601 compliant date.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"offset":{"required":false,"description":"Offset the result set by a specific number of items.","type":"integer"},"order":{"required":false,"default":"desc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"date","enum":["date","relevance","id","include","title","slug"],"description":"Sort collection by object attribute.","type":"string"},"slug":{"required":false,"description":"Limit result set to posts with one or more specific slugs.","type":"array","items":{"type":"string"}},"status":{"required":false,"default":"publish","description":"Limit result set to posts assigned one or more statuses.","type":"array","items":{"enum":["publish","future","draft","pending","private","trash","auto-draft","inherit","any"],"type":"string"}},"categories":{"required":false,"default":[],"description":"Limit result set to all items that have the specified term assigned in the categories taxonomy.","type":"array","items":{"type":"integer"}},"categories_exclude":{"required":false,"default":[],"description":"Limit result set to all items except those that have the specified term assigned in the categories taxonomy.","type":"array","items":{"type":"integer"}},"tags":{"required":false,"default":[],"description":"Limit result set to all items that have the specified term assigned in the tags taxonomy.","type":"array","items":{"type":"integer"}},"tags_exclude":{"required":false,"default":[],"description":"Limit result set to all items except those that have the specified term assigned in the tags taxonomy.","type":"array","items":{"type":"integer"}},"sticky":{"required":false,"description":"Limit result set to items that are sticky.","type":"boolean"}}},{"methods":["POST"],"args":{"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the object unique to its type.","type":"string"},"status":{"required":false,"enum":["publish","future","draft","pending","private"],"description":"A named status for the object.","type":"string"},"password":{"required":false,"description":"A password to protect access to the content and excerpt.","type":"string"},"title":{"required":false,"description":"The title for the object.","type":"object"},"content":{"required":false,"description":"The content for the object.","type":"object"},"author":{"required":false,"description":"The ID for the author of the object.","type":"integer"},"excerpt":{"required":false,"description":"The excerpt for the object.","type":"object"},"featured_media":{"required":false,"description":"The ID of the featured media for the object.","type":"integer"},"comment_status":{"required":false,"enum":["open","closed"],"description":"Whether or not comments are open on the object.","type":"string"},"ping_status":{"required":false,"enum":["open","closed"],"description":"Whether or not the object can be pinged.","type":"string"},"format":{"required":false,"enum":["standard"],"description":"The format for the object.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"},"sticky":{"required":false,"description":"Whether or not the object should be treated as sticky.","type":"boolean"},"template":{"required":false,"enum":[""],"description":"The theme file to use to display the object.","type":"string"},"categories":{"required":false,"description":"The terms assigned to the object in the category taxonomy.","type":"array","items":{"type":"integer"}},"tags":{"required":false,"description":"The terms assigned to the object in the post_tag taxonomy.","type":"array","items":{"type":"integer"}}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts"}},"\/wp\/v2\/posts\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"password":{"required":false,"description":"The password for the post if it is password protected.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the object unique to its type.","type":"string"},"status":{"required":false,"enum":["publish","future","draft","pending","private"],"description":"A named status for the object.","type":"string"},"password":{"required":false,"description":"A password to protect access to the content and excerpt.","type":"string"},"title":{"required":false,"description":"The title for the object.","type":"object"},"content":{"required":false,"description":"The content for the object.","type":"object"},"author":{"required":false,"description":"The ID for the author of the object.","type":"integer"},"excerpt":{"required":false,"description":"The excerpt for the object.","type":"object"},"featured_media":{"required":false,"description":"The ID of the featured media for the object.","type":"integer"},"comment_status":{"required":false,"enum":["open","closed"],"description":"Whether or not comments are open on the object.","type":"string"},"ping_status":{"required":false,"enum":["open","closed"],"description":"Whether or not the object can be pinged.","type":"string"},"format":{"required":false,"enum":["standard"],"description":"The format for the object.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"},"sticky":{"required":false,"description":"Whether or not the object should be treated as sticky.","type":"boolean"},"template":{"required":false,"enum":[""],"description":"The theme file to use to display the object.","type":"string"},"categories":{"required":false,"description":"The terms assigned to the object in the category taxonomy.","type":"array","items":{"type":"integer"}},"tags":{"required":false,"description":"The terms assigned to the object in the post_tag taxonomy.","type":"array","items":{"type":"integer"}}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"force":{"required":false,"default":false,"description":"Whether to bypass trash and force deletion.","type":"boolean"}}}]},"\/wp\/v2\/posts\/(?P<parent>[\\d]+)\/revisions":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}]},"\/wp\/v2\/posts\/(?P<parent>[\\d]+)\/revisions\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","DELETE"],"endpoints":[{"methods":["GET"],"args":{"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["DELETE"],"args":{"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"force":{"required":false,"default":false,"description":"Required to be true, as revisions do not support trashing.","type":"boolean"}}}]},"\/wp\/v2\/pages":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"after":{"required":false,"description":"Limit response to posts published after a given ISO8601 compliant date.","type":"string"},"author":{"required":false,"default":[],"description":"Limit result set to posts assigned to specific authors.","type":"array","items":{"type":"integer"}},"author_exclude":{"required":false,"default":[],"description":"Ensure result set excludes posts assigned to specific authors.","type":"array","items":{"type":"integer"}},"before":{"required":false,"description":"Limit response to posts published before a given ISO8601 compliant date.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"menu_order":{"required":false,"description":"Limit result set to posts with a specific menu_order value.","type":"integer"},"offset":{"required":false,"description":"Offset the result set by a specific number of items.","type":"integer"},"order":{"required":false,"default":"desc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"date","enum":["date","relevance","id","include","title","slug","menu_order"],"description":"Sort collection by object attribute.","type":"string"},"parent":{"required":false,"default":[],"description":"Limit result set to those of particular parent IDs.","type":"array","items":{"type":"integer"}},"parent_exclude":{"required":false,"default":[],"description":"Limit result set to all items except those of a particular parent ID.","type":"array","items":{"type":"integer"}},"slug":{"required":false,"description":"Limit result set to posts with one or more specific slugs.","type":"array","items":{"type":"string"}},"status":{"required":false,"default":"publish","description":"Limit result set to posts assigned one or more statuses.","type":"array","items":{"enum":["publish","future","draft","pending","private","trash","auto-draft","inherit","any"],"type":"string"}}}},{"methods":["POST"],"args":{"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the object unique to its type.","type":"string"},"status":{"required":false,"enum":["publish","future","draft","pending","private"],"description":"A named status for the object.","type":"string"},"password":{"required":false,"description":"A password to protect access to the content and excerpt.","type":"string"},"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"title":{"required":false,"description":"The title for the object.","type":"object"},"content":{"required":false,"description":"The content for the object.","type":"object"},"author":{"required":false,"description":"The ID for the author of the object.","type":"integer"},"excerpt":{"required":false,"description":"The excerpt for the object.","type":"object"},"featured_media":{"required":false,"description":"The ID of the featured media for the object.","type":"integer"},"comment_status":{"required":false,"enum":["open","closed"],"description":"Whether or not comments are open on the object.","type":"string"},"ping_status":{"required":false,"enum":["open","closed"],"description":"Whether or not the object can be pinged.","type":"string"},"menu_order":{"required":false,"description":"The order of the object in relation to other object of its type.","type":"integer"},"meta":{"required":false,"description":"Meta fields.","type":"object"},"template":{"required":false,"enum":[""],"description":"The theme file to use to display the object.","type":"string"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/pages"}},"\/wp\/v2\/pages\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"password":{"required":false,"description":"The password for the post if it is password protected.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the object unique to its type.","type":"string"},"status":{"required":false,"enum":["publish","future","draft","pending","private"],"description":"A named status for the object.","type":"string"},"password":{"required":false,"description":"A password to protect access to the content and excerpt.","type":"string"},"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"title":{"required":false,"description":"The title for the object.","type":"object"},"content":{"required":false,"description":"The content for the object.","type":"object"},"author":{"required":false,"description":"The ID for the author of the object.","type":"integer"},"excerpt":{"required":false,"description":"The excerpt for the object.","type":"object"},"featured_media":{"required":false,"description":"The ID of the featured media for the object.","type":"integer"},"comment_status":{"required":false,"enum":["open","closed"],"description":"Whether or not comments are open on the object.","type":"string"},"ping_status":{"required":false,"enum":["open","closed"],"description":"Whether or not the object can be pinged.","type":"string"},"menu_order":{"required":false,"description":"The order of the object in relation to other object of its type.","type":"integer"},"meta":{"required":false,"description":"Meta fields.","type":"object"},"template":{"required":false,"enum":[""],"description":"The theme file to use to display the object.","type":"string"}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"force":{"required":false,"default":false,"description":"Whether to bypass trash and force deletion.","type":"boolean"}}}]},"\/wp\/v2\/pages\/(?P<parent>[\\d]+)\/revisions":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}]},"\/wp\/v2\/pages\/(?P<parent>[\\d]+)\/revisions\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","DELETE"],"endpoints":[{"methods":["GET"],"args":{"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["DELETE"],"args":{"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"force":{"required":false,"default":false,"description":"Required to be true, as revisions do not support trashing.","type":"boolean"}}}]},"\/wp\/v2\/media":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"after":{"required":false,"description":"Limit response to posts published after a given ISO8601 compliant date.","type":"string"},"author":{"required":false,"default":[],"description":"Limit result set to posts assigned to specific authors.","type":"array","items":{"type":"integer"}},"author_exclude":{"required":false,"default":[],"description":"Ensure result set excludes posts assigned to specific authors.","type":"array","items":{"type":"integer"}},"before":{"required":false,"description":"Limit response to posts published before a given ISO8601 compliant date.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"offset":{"required":false,"description":"Offset the result set by a specific number of items.","type":"integer"},"order":{"required":false,"default":"desc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"date","enum":["date","relevance","id","include","title","slug"],"description":"Sort collection by object attribute.","type":"string"},"parent":{"required":false,"default":[],"description":"Limit result set to those of particular parent IDs.","type":"array","items":{"type":"integer"}},"parent_exclude":{"required":false,"default":[],"description":"Limit result set to all items except those of a particular parent ID.","type":"array","items":{"type":"integer"}},"slug":{"required":false,"description":"Limit result set to posts with one or more specific slugs.","type":"array","items":{"type":"string"}},"status":{"required":false,"default":"inherit","description":"Limit result set to posts assigned one or more statuses.","type":"array","items":{"enum":["inherit","private","trash"],"type":"string"}},"media_type":{"required":false,"enum":["image","video","text","application","audio"],"description":"Limit result set to attachments of a particular media type.","type":"string"},"mime_type":{"required":false,"description":"Limit result set to attachments of a particular MIME type.","type":"string"}}},{"methods":["POST"],"args":{"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the object unique to its type.","type":"string"},"status":{"required":false,"enum":["publish","future","draft","pending","private"],"description":"A named status for the object.","type":"string"},"title":{"required":false,"description":"The title for the object.","type":"object"},"author":{"required":false,"description":"The ID for the author of the object.","type":"integer"},"comment_status":{"required":false,"enum":["open","closed"],"description":"Whether or not comments are open on the object.","type":"string"},"ping_status":{"required":false,"enum":["open","closed"],"description":"Whether or not the object can be pinged.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"},"template":{"required":false,"enum":[""],"description":"The theme file to use to display the object.","type":"string"},"alt_text":{"required":false,"description":"Alternative text to display when attachment is not displayed.","type":"string"},"caption":{"required":false,"description":"The attachment caption.","type":"object"},"description":{"required":false,"description":"The attachment description.","type":"object"},"post":{"required":false,"description":"The ID for the associated post of the attachment.","type":"integer"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/media"}},"\/wp\/v2\/media\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the object unique to its type.","type":"string"},"status":{"required":false,"enum":["publish","future","draft","pending","private"],"description":"A named status for the object.","type":"string"},"title":{"required":false,"description":"The title for the object.","type":"object"},"author":{"required":false,"description":"The ID for the author of the object.","type":"integer"},"comment_status":{"required":false,"enum":["open","closed"],"description":"Whether or not comments are open on the object.","type":"string"},"ping_status":{"required":false,"enum":["open","closed"],"description":"Whether or not the object can be pinged.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"},"template":{"required":false,"enum":[""],"description":"The theme file to use to display the object.","type":"string"},"alt_text":{"required":false,"description":"Alternative text to display when attachment is not displayed.","type":"string"},"caption":{"required":false,"description":"The attachment caption.","type":"object"},"description":{"required":false,"description":"The attachment description.","type":"object"},"post":{"required":false,"description":"The ID for the associated post of the attachment.","type":"integer"}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"force":{"required":false,"default":false,"description":"Whether to bypass trash and force deletion.","type":"boolean"}}}]},"\/wp\/v2\/types":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types"}},"\/wp\/v2\/types\/(?P<type>[\\w-]+)":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"type":{"required":false,"description":"An alphanumeric identifier for the post type.","type":"string"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}]},"\/wp\/v2\/statuses":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/statuses"}},"\/wp\/v2\/statuses\/(?P<status>[\\w-]+)":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"status":{"required":false,"description":"An alphanumeric identifier for the status.","type":"string"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}]},"\/wp\/v2\/taxonomies":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"type":{"required":false,"description":"Limit results to taxonomies associated with a specific post type.","type":"string"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/taxonomies"}},"\/wp\/v2\/taxonomies\/(?P<taxonomy>[\\w-]+)":{"namespace":"wp\/v2","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"taxonomy":{"required":false,"description":"An alphanumeric identifier for the taxonomy.","type":"string"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}}]},"\/wp\/v2\/categories":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"order":{"required":false,"default":"asc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"name","enum":["id","include","name","slug","term_group","description","count"],"description":"Sort collection by term attribute.","type":"string"},"hide_empty":{"required":false,"default":false,"description":"Whether to hide terms not assigned to any posts.","type":"boolean"},"parent":{"required":false,"description":"Limit result set to terms assigned to a specific parent.","type":"integer"},"post":{"required":false,"description":"Limit result set to terms assigned to a specific post.","type":"integer"},"slug":{"required":false,"description":"Limit result set to terms with a specific slug.","type":"string"}}},{"methods":["POST"],"args":{"description":{"required":false,"description":"HTML description of the term.","type":"string"},"name":{"required":true,"description":"HTML title for the term.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the term unique to its type.","type":"string"},"parent":{"required":false,"description":"The parent term ID.","type":"integer"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/categories"}},"\/wp\/v2\/categories\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the term.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the term.","type":"integer"},"description":{"required":false,"description":"HTML description of the term.","type":"string"},"name":{"required":false,"description":"HTML title for the term.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the term unique to its type.","type":"string"},"parent":{"required":false,"description":"The parent term ID.","type":"integer"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the term.","type":"integer"},"force":{"required":false,"default":false,"description":"Required to be true, as terms do not support trashing.","type":"boolean"}}}]},"\/wp\/v2\/tags":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"offset":{"required":false,"description":"Offset the result set by a specific number of items.","type":"integer"},"order":{"required":false,"default":"asc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"name","enum":["id","include","name","slug","term_group","description","count"],"description":"Sort collection by term attribute.","type":"string"},"hide_empty":{"required":false,"default":false,"description":"Whether to hide terms not assigned to any posts.","type":"boolean"},"post":{"required":false,"description":"Limit result set to terms assigned to a specific post.","type":"integer"},"slug":{"required":false,"description":"Limit result set to terms with a specific slug.","type":"string"}}},{"methods":["POST"],"args":{"description":{"required":false,"description":"HTML description of the term.","type":"string"},"name":{"required":true,"description":"HTML title for the term.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the term unique to its type.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/tags"}},"\/wp\/v2\/tags\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the term.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the term.","type":"integer"},"description":{"required":false,"description":"HTML description of the term.","type":"string"},"name":{"required":false,"description":"HTML title for the term.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the term unique to its type.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the term.","type":"integer"},"force":{"required":false,"default":false,"description":"Required to be true, as terms do not support trashing.","type":"boolean"}}}]},"\/wp\/v2\/users":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"offset":{"required":false,"description":"Offset the result set by a specific number of items.","type":"integer"},"order":{"required":false,"default":"asc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"name","enum":["id","include","name","registered_date","slug","email","url"],"description":"Sort collection by object attribute.","type":"string"},"slug":{"required":false,"description":"Limit result set to users with a specific slug.","type":"string"},"roles":{"required":false,"description":"Limit result set to users matching at least one specific role provided. Accepts csv list or single role.","type":"array","items":{"type":"string"}}}},{"methods":["POST"],"args":{"username":{"required":true,"description":"Login name for the user.","type":"string"},"name":{"required":false,"description":"Display name for the user.","type":"string"},"first_name":{"required":false,"description":"First name for the user.","type":"string"},"last_name":{"required":false,"description":"Last name for the user.","type":"string"},"email":{"required":true,"description":"The email address for the user.","type":"string"},"url":{"required":false,"description":"URL of the user.","type":"string"},"description":{"required":false,"description":"Description of the user.","type":"string"},"locale":{"required":false,"enum":["","en_US","de_DE","en_GB","es_ES"],"description":"Locale for the user.","type":"string"},"nickname":{"required":false,"description":"The nickname for the user.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the user.","type":"string"},"roles":{"required":false,"description":"Roles assigned to the user.","type":"array","items":{"type":"string"}},"password":{"required":true,"description":"Password for the user (never included).","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/users"}},"\/wp\/v2\/users\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the user.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the user.","type":"integer"},"username":{"required":false,"description":"Login name for the user.","type":"string"},"name":{"required":false,"description":"Display name for the user.","type":"string"},"first_name":{"required":false,"description":"First name for the user.","type":"string"},"last_name":{"required":false,"description":"Last name for the user.","type":"string"},"email":{"required":false,"description":"The email address for the user.","type":"string"},"url":{"required":false,"description":"URL of the user.","type":"string"},"description":{"required":false,"description":"Description of the user.","type":"string"},"locale":{"required":false,"enum":["","en_US","de_DE","en_GB","es_ES"],"description":"Locale for the user.","type":"string"},"nickname":{"required":false,"description":"The nickname for the user.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the user.","type":"string"},"roles":{"required":false,"description":"Roles assigned to the user.","type":"array","items":{"type":"string"}},"password":{"required":false,"description":"Password for the user (never included).","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the user.","type":"integer"},"force":{"required":false,"default":false,"description":"Required to be true, as users do not support trashing.","type":"boolean"},"reassign":{"required":true,"description":"Reassign the deleted user's posts and links to this user ID.","type":"integer"}}}]},"\/wp\/v2\/users\/me":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"username":{"required":false,"description":"Login name for the user.","type":"string"},"name":{"required":false,"description":"Display name for the user.","type":"string"},"first_name":{"required":false,"description":"First name for the user.","type":"string"},"last_name":{"required":false,"description":"Last name for the user.","type":"string"},"email":{"required":false,"description":"The email address for the user.","type":"string"},"url":{"required":false,"description":"URL of the user.","type":"string"},"description":{"required":false,"description":"Description of the user.","type":"string"},"locale":{"required":false,"enum":["","en_US","de_DE","en_GB","es_ES"],"description":"Locale for the user.","type":"string"},"nickname":{"required":false,"description":"The nickname for the user.","type":"string"},"slug":{"required":false,"description":"An alphanumeric identifier for the user.","type":"string"},"roles":{"required":false,"description":"Roles assigned to the user.","type":"array","items":{"type":"string"}},"password":{"required":false,"description":"Password for the user (never included).","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}},{"methods":["DELETE"],"args":{"force":{"required":false,"default":false,"description":"Required to be true, as users do not support trashing.","type":"boolean"},"reassign":{"required":true,"description":"Reassign the deleted user's posts and links to this user ID.","type":"integer"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/users\/me"}},"\/wp\/v2\/comments":{"namespace":"wp\/v2","methods":["GET","POST"],"endpoints":[{"methods":["GET"],"args":{"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"page":{"required":false,"default":1,"description":"Current page of the collection.","type":"integer"},"per_page":{"required":false,"default":10,"description":"Maximum number of items to be returned in result set.","type":"integer"},"search":{"required":false,"description":"Limit results to those matching a string.","type":"string"},"after":{"required":false,"description":"Limit response to comments published after a given ISO8601 compliant date.","type":"string"},"author":{"required":false,"description":"Limit result set to comments assigned to specific user IDs. Requires authorization.","type":"array","items":{"type":"integer"}},"author_exclude":{"required":false,"description":"Ensure result set excludes comments assigned to specific user IDs. Requires authorization.","type":"array","items":{"type":"integer"}},"author_email":{"required":false,"description":"Limit result set to that from a specific author email. Requires authorization.","type":"string"},"before":{"required":false,"description":"Limit response to comments published before a given ISO8601 compliant date.","type":"string"},"exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific IDs.","type":"array","items":{"type":"integer"}},"include":{"required":false,"default":[],"description":"Limit result set to specific IDs.","type":"array","items":{"type":"integer"}},"offset":{"required":false,"description":"Offset the result set by a specific number of items.","type":"integer"},"order":{"required":false,"default":"desc","enum":["asc","desc"],"description":"Order sort attribute ascending or descending.","type":"string"},"orderby":{"required":false,"default":"date_gmt","enum":["date","date_gmt","id","include","post","parent","type"],"description":"Sort collection by object attribute.","type":"string"},"parent":{"required":false,"default":[],"description":"Limit result set to comments of specific parent IDs.","type":"array","items":{"type":"integer"}},"parent_exclude":{"required":false,"default":[],"description":"Ensure result set excludes specific parent IDs.","type":"array","items":{"type":"integer"}},"post":{"required":false,"default":[],"description":"Limit result set to comments assigned to specific post IDs.","type":"array","items":{"type":"integer"}},"status":{"required":false,"default":"approve","description":"Limit result set to comments assigned a specific status. Requires authorization.","type":"string"},"type":{"required":false,"default":"comment","description":"Limit result set to comments assigned a specific type. Requires authorization.","type":"string"},"password":{"required":false,"description":"The password for the post if it is password protected.","type":"string"}}},{"methods":["POST"],"args":{"author":{"required":false,"description":"The ID of the user object, if author was a user.","type":"integer"},"author_email":{"required":false,"description":"Email address for the object author.","type":"string"},"author_ip":{"required":false,"description":"IP address for the object author.","type":"string"},"author_name":{"required":false,"description":"Display name for the object author.","type":"string"},"author_url":{"required":false,"description":"URL for the object author.","type":"string"},"author_user_agent":{"required":false,"description":"User agent for the object author.","type":"string"},"content":{"required":false,"description":"The content for the object.","type":"object"},"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"parent":{"required":false,"default":0,"description":"The ID for the parent of the object.","type":"integer"},"post":{"required":false,"default":0,"description":"The ID of the associated post object.","type":"integer"},"status":{"required":false,"description":"State of the object.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/comments"}},"\/wp\/v2\/comments\/(?P<id>[\\d]+)":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH","DELETE"],"endpoints":[{"methods":["GET"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"context":{"required":false,"default":"view","enum":["view","embed","edit"],"description":"Scope under which the request is made; determines fields present in response.","type":"string"},"password":{"required":false,"description":"The password for the post if it is password protected.","type":"string"}}},{"methods":["POST","PUT","PATCH"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"author":{"required":false,"description":"The ID of the user object, if author was a user.","type":"integer"},"author_email":{"required":false,"description":"Email address for the object author.","type":"string"},"author_ip":{"required":false,"description":"IP address for the object author.","type":"string"},"author_name":{"required":false,"description":"Display name for the object author.","type":"string"},"author_url":{"required":false,"description":"URL for the object author.","type":"string"},"author_user_agent":{"required":false,"description":"User agent for the object author.","type":"string"},"content":{"required":false,"description":"The content for the object.","type":"object"},"date":{"required":false,"description":"The date the object was published, in the site's timezone.","type":"string"},"date_gmt":{"required":false,"description":"The date the object was published, as GMT.","type":"string"},"parent":{"required":false,"description":"The ID for the parent of the object.","type":"integer"},"post":{"required":false,"description":"The ID of the associated post object.","type":"integer"},"status":{"required":false,"description":"State of the object.","type":"string"},"meta":{"required":false,"description":"Meta fields.","type":"object"}}},{"methods":["DELETE"],"args":{"id":{"required":false,"description":"Unique identifier for the object.","type":"integer"},"force":{"required":false,"default":false,"description":"Whether to bypass trash and force deletion.","type":"boolean"},"password":{"required":false,"description":"The password for the post if it is password protected.","type":"string"}}}]},"\/wp\/v2\/settings":{"namespace":"wp\/v2","methods":["GET","POST","PUT","PATCH"],"endpoints":[{"methods":["GET"],"args":[]},{"methods":["POST","PUT","PATCH"],"args":{"title":{"required":false,"description":"Site title.","type":"string"},"description":{"required":false,"description":"Site tagline.","type":"string"},"url":{"required":false,"description":"Site URL.","type":"string"},"email":{"required":false,"description":"This address is used for admin purposes, like new user notification.","type":"string"},"timezone":{"required":false,"description":"A city in the same timezone as you.","type":"string"},"date_format":{"required":false,"description":"A date format for all date strings.","type":"string"},"time_format":{"required":false,"description":"A time format for all time strings.","type":"string"},"start_of_week":{"required":false,"description":"A day number of the week that the week should start on.","type":"integer"},"language":{"required":false,"description":"WordPress locale code.","type":"string"},"use_smilies":{"required":false,"description":"Convert emoticons like :-) and :-P to graphics on display.","type":"boolean"},"default_category":{"required":false,"description":"Default post category.","type":"integer"},"default_post_format":{"required":false,"description":"Default post format.","type":"string"},"posts_per_page":{"required":false,"description":"Blog pages show at most.","type":"integer"},"default_ping_status":{"required":false,"enum":["open","closed"],"description":"Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.","type":"string"},"default_comment_status":{"required":false,"enum":["open","closed"],"description":"Allow people to post comments on new articles.","type":"string"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/wp\/v2\/settings"}}}}; 5 var mockedApiResponse = {}; 6 /* jshint -W109 */ 10 7 11 mockedApiResponse.oembed = {"namespace":"oembed\/1.0","routes":{"\/oembed\/1.0":{"namespace":"oembed\/1.0","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"namespace":{"required":false,"default":"oembed\/1.0"},"context":{"required":false,"default":"view"}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/oembed\/1.0"}},"\/oembed\/1.0\/embed":{"namespace":"oembed\/1.0","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"url":{"required":true},"format":{"required":false,"default":"json"},"maxwidth":{"required":false,"default":600}}}],"_links":{"self":"http:\/\/example.org\/?rest_route=\/oembed\/1.0\/embed"}}}}; 8 mockedApiResponse.Schema = { 9 "name": "Test Blog", 10 "description": "Just another WordPress site", 11 "url": "http://example.org", 12 "home": "http://example.org", 13 "namespaces": [ 14 "oembed/1.0", 15 "wp/v2" 16 ], 17 "authentication": [], 18 "routes": { 19 "/": { 20 "namespace": "", 21 "methods": [ 22 "GET" 23 ], 24 "endpoints": [ 25 { 26 "methods": [ 27 "GET" 28 ], 29 "args": { 30 "context": { 31 "required": false, 32 "default": "view" 33 } 34 } 35 } 36 ], 37 "_links": { 38 "self": "http://example.org/?rest_route=/" 39 } 40 }, 41 "/oembed/1.0": { 42 "namespace": "oembed/1.0", 43 "methods": [ 44 "GET" 45 ], 46 "endpoints": [ 47 { 48 "methods": [ 49 "GET" 50 ], 51 "args": { 52 "namespace": { 53 "required": false, 54 "default": "oembed/1.0" 55 }, 56 "context": { 57 "required": false, 58 "default": "view" 59 } 60 } 61 } 62 ], 63 "_links": { 64 "self": "http://example.org/?rest_route=/oembed/1.0" 65 } 66 }, 67 "/oembed/1.0/embed": { 68 "namespace": "oembed/1.0", 69 "methods": [ 70 "GET" 71 ], 72 "endpoints": [ 73 { 74 "methods": [ 75 "GET" 76 ], 77 "args": { 78 "url": { 79 "required": true 80 }, 81 "format": { 82 "required": false, 83 "default": "json" 84 }, 85 "maxwidth": { 86 "required": false, 87 "default": 600 88 } 89 } 90 } 91 ], 92 "_links": { 93 "self": "http://example.org/?rest_route=/oembed/1.0/embed" 94 } 95 }, 96 "/wp/v2": { 97 "namespace": "wp/v2", 98 "methods": [ 99 "GET" 100 ], 101 "endpoints": [ 102 { 103 "methods": [ 104 "GET" 105 ], 106 "args": { 107 "namespace": { 108 "required": false, 109 "default": "wp/v2" 110 }, 111 "context": { 112 "required": false, 113 "default": "view" 114 } 115 } 116 } 117 ], 118 "_links": { 119 "self": "http://example.org/?rest_route=/wp/v2" 120 } 121 }, 122 "/wp/v2/posts": { 123 "namespace": "wp/v2", 124 "methods": [ 125 "GET", 126 "POST" 127 ], 128 "endpoints": [ 129 { 130 "methods": [ 131 "GET" 132 ], 133 "args": { 134 "context": { 135 "required": false, 136 "default": "view", 137 "enum": [ 138 "view", 139 "embed", 140 "edit" 141 ], 142 "description": "Scope under which the request is made; determines fields present in response.", 143 "type": "string" 144 }, 145 "page": { 146 "required": false, 147 "default": 1, 148 "description": "Current page of the collection.", 149 "type": "integer" 150 }, 151 "per_page": { 152 "required": false, 153 "default": 10, 154 "description": "Maximum number of items to be returned in result set.", 155 "type": "integer" 156 }, 157 "search": { 158 "required": false, 159 "description": "Limit results to those matching a string.", 160 "type": "string" 161 }, 162 "after": { 163 "required": false, 164 "description": "Limit response to posts published after a given ISO8601 compliant date.", 165 "type": "string" 166 }, 167 "author": { 168 "required": false, 169 "default": [], 170 "description": "Limit result set to posts assigned to specific authors.", 171 "type": "array", 172 "items": { 173 "type": "integer" 174 } 175 }, 176 "author_exclude": { 177 "required": false, 178 "default": [], 179 "description": "Ensure result set excludes posts assigned to specific authors.", 180 "type": "array", 181 "items": { 182 "type": "integer" 183 } 184 }, 185 "before": { 186 "required": false, 187 "description": "Limit response to posts published before a given ISO8601 compliant date.", 188 "type": "string" 189 }, 190 "exclude": { 191 "required": false, 192 "default": [], 193 "description": "Ensure result set excludes specific IDs.", 194 "type": "array", 195 "items": { 196 "type": "integer" 197 } 198 }, 199 "include": { 200 "required": false, 201 "default": [], 202 "description": "Limit result set to specific IDs.", 203 "type": "array", 204 "items": { 205 "type": "integer" 206 } 207 }, 208 "offset": { 209 "required": false, 210 "description": "Offset the result set by a specific number of items.", 211 "type": "integer" 212 }, 213 "order": { 214 "required": false, 215 "default": "desc", 216 "enum": [ 217 "asc", 218 "desc" 219 ], 220 "description": "Order sort attribute ascending or descending.", 221 "type": "string" 222 }, 223 "orderby": { 224 "required": false, 225 "default": "date", 226 "enum": [ 227 "date", 228 "relevance", 229 "id", 230 "include", 231 "title", 232 "slug" 233 ], 234 "description": "Sort collection by object attribute.", 235 "type": "string" 236 }, 237 "slug": { 238 "required": false, 239 "description": "Limit result set to posts with one or more specific slugs.", 240 "type": "array", 241 "items": { 242 "type": "string" 243 } 244 }, 245 "status": { 246 "required": false, 247 "default": "publish", 248 "description": "Limit result set to posts assigned one or more statuses.", 249 "type": "array", 250 "items": { 251 "enum": [ 252 "publish", 253 "future", 254 "draft", 255 "pending", 256 "private", 257 "trash", 258 "auto-draft", 259 "inherit", 260 "any" 261 ], 262 "type": "string" 263 } 264 }, 265 "categories": { 266 "required": false, 267 "default": [], 268 "description": "Limit result set to all items that have the specified term assigned in the categories taxonomy.", 269 "type": "array", 270 "items": { 271 "type": "integer" 272 } 273 }, 274 "categories_exclude": { 275 "required": false, 276 "default": [], 277 "description": "Limit result set to all items except those that have the specified term assigned in the categories taxonomy.", 278 "type": "array", 279 "items": { 280 "type": "integer" 281 } 282 }, 283 "tags": { 284 "required": false, 285 "default": [], 286 "description": "Limit result set to all items that have the specified term assigned in the tags taxonomy.", 287 "type": "array", 288 "items": { 289 "type": "integer" 290 } 291 }, 292 "tags_exclude": { 293 "required": false, 294 "default": [], 295 "description": "Limit result set to all items except those that have the specified term assigned in the tags taxonomy.", 296 "type": "array", 297 "items": { 298 "type": "integer" 299 } 300 }, 301 "sticky": { 302 "required": false, 303 "description": "Limit result set to items that are sticky.", 304 "type": "boolean" 305 } 306 } 307 }, 308 { 309 "methods": [ 310 "POST" 311 ], 312 "args": { 313 "date": { 314 "required": false, 315 "description": "The date the object was published, in the site's timezone.", 316 "type": "string" 317 }, 318 "date_gmt": { 319 "required": false, 320 "description": "The date the object was published, as GMT.", 321 "type": "string" 322 }, 323 "slug": { 324 "required": false, 325 "description": "An alphanumeric identifier for the object unique to its type.", 326 "type": "string" 327 }, 328 "status": { 329 "required": false, 330 "enum": [ 331 "publish", 332 "future", 333 "draft", 334 "pending", 335 "private" 336 ], 337 "description": "A named status for the object.", 338 "type": "string" 339 }, 340 "password": { 341 "required": false, 342 "description": "A password to protect access to the content and excerpt.", 343 "type": "string" 344 }, 345 "title": { 346 "required": false, 347 "description": "The title for the object.", 348 "type": "object" 349 }, 350 "content": { 351 "required": false, 352 "description": "The content for the object.", 353 "type": "object" 354 }, 355 "author": { 356 "required": false, 357 "description": "The ID for the author of the object.", 358 "type": "integer" 359 }, 360 "excerpt": { 361 "required": false, 362 "description": "The excerpt for the object.", 363 "type": "object" 364 }, 365 "featured_media": { 366 "required": false, 367 "description": "The ID of the featured media for the object.", 368 "type": "integer" 369 }, 370 "comment_status": { 371 "required": false, 372 "enum": [ 373 "open", 374 "closed" 375 ], 376 "description": "Whether or not comments are open on the object.", 377 "type": "string" 378 }, 379 "ping_status": { 380 "required": false, 381 "enum": [ 382 "open", 383 "closed" 384 ], 385 "description": "Whether or not the object can be pinged.", 386 "type": "string" 387 }, 388 "format": { 389 "required": false, 390 "enum": [ 391 "standard" 392 ], 393 "description": "The format for the object.", 394 "type": "string" 395 }, 396 "meta": { 397 "required": false, 398 "description": "Meta fields.", 399 "type": "object" 400 }, 401 "sticky": { 402 "required": false, 403 "description": "Whether or not the object should be treated as sticky.", 404 "type": "boolean" 405 }, 406 "template": { 407 "required": false, 408 "enum": [ 409 "" 410 ], 411 "description": "The theme file to use to display the object.", 412 "type": "string" 413 }, 414 "categories": { 415 "required": false, 416 "description": "The terms assigned to the object in the category taxonomy.", 417 "type": "array", 418 "items": { 419 "type": "integer" 420 } 421 }, 422 "tags": { 423 "required": false, 424 "description": "The terms assigned to the object in the post_tag taxonomy.", 425 "type": "array", 426 "items": { 427 "type": "integer" 428 } 429 } 430 } 431 } 432 ], 433 "_links": { 434 "self": "http://example.org/?rest_route=/wp/v2/posts" 435 } 436 }, 437 "/wp/v2/posts/(?P<id>[\\d]+)": { 438 "namespace": "wp/v2", 439 "methods": [ 440 "GET", 441 "POST", 442 "PUT", 443 "PATCH", 444 "DELETE" 445 ], 446 "endpoints": [ 447 { 448 "methods": [ 449 "GET" 450 ], 451 "args": { 452 "id": { 453 "required": false, 454 "description": "Unique identifier for the object.", 455 "type": "integer" 456 }, 457 "context": { 458 "required": false, 459 "default": "view", 460 "enum": [ 461 "view", 462 "embed", 463 "edit" 464 ], 465 "description": "Scope under which the request is made; determines fields present in response.", 466 "type": "string" 467 }, 468 "password": { 469 "required": false, 470 "description": "The password for the post if it is password protected.", 471 "type": "string" 472 } 473 } 474 }, 475 { 476 "methods": [ 477 "POST", 478 "PUT", 479 "PATCH" 480 ], 481 "args": { 482 "id": { 483 "required": false, 484 "description": "Unique identifier for the object.", 485 "type": "integer" 486 }, 487 "date": { 488 "required": false, 489 "description": "The date the object was published, in the site's timezone.", 490 "type": "string" 491 }, 492 "date_gmt": { 493 "required": false, 494 "description": "The date the object was published, as GMT.", 495 "type": "string" 496 }, 497 "slug": { 498 "required": false, 499 "description": "An alphanumeric identifier for the object unique to its type.", 500 "type": "string" 501 }, 502 "status": { 503 "required": false, 504 "enum": [ 505 "publish", 506 "future", 507 "draft", 508 "pending", 509 "private" 510 ], 511 "description": "A named status for the object.", 512 "type": "string" 513 }, 514 "password": { 515 "required": false, 516 "description": "A password to protect access to the content and excerpt.", 517 "type": "string" 518 }, 519 "title": { 520 "required": false, 521 "description": "The title for the object.", 522 "type": "object" 523 }, 524 "content": { 525 "required": false, 526 "description": "The content for the object.", 527 "type": "object" 528 }, 529 "author": { 530 "required": false, 531 "description": "The ID for the author of the object.", 532 "type": "integer" 533 }, 534 "excerpt": { 535 "required": false, 536 "description": "The excerpt for the object.", 537 "type": "object" 538 }, 539 "featured_media": { 540 "required": false, 541 "description": "The ID of the featured media for the object.", 542 "type": "integer" 543 }, 544 "comment_status": { 545 "required": false, 546 "enum": [ 547 "open", 548 "closed" 549 ], 550 "description": "Whether or not comments are open on the object.", 551 "type": "string" 552 }, 553 "ping_status": { 554 "required": false, 555 "enum": [ 556 "open", 557 "closed" 558 ], 559 "description": "Whether or not the object can be pinged.", 560 "type": "string" 561 }, 562 "format": { 563 "required": false, 564 "enum": [ 565 "standard" 566 ], 567 "description": "The format for the object.", 568 "type": "string" 569 }, 570 "meta": { 571 "required": false, 572 "description": "Meta fields.", 573 "type": "object" 574 }, 575 "sticky": { 576 "required": false, 577 "description": "Whether or not the object should be treated as sticky.", 578 "type": "boolean" 579 }, 580 "template": { 581 "required": false, 582 "enum": [ 583 "" 584 ], 585 "description": "The theme file to use to display the object.", 586 "type": "string" 587 }, 588 "categories": { 589 "required": false, 590 "description": "The terms assigned to the object in the category taxonomy.", 591 "type": "array", 592 "items": { 593 "type": "integer" 594 } 595 }, 596 "tags": { 597 "required": false, 598 "description": "The terms assigned to the object in the post_tag taxonomy.", 599 "type": "array", 600 "items": { 601 "type": "integer" 602 } 603 } 604 } 605 }, 606 { 607 "methods": [ 608 "DELETE" 609 ], 610 "args": { 611 "id": { 612 "required": false, 613 "description": "Unique identifier for the object.", 614 "type": "integer" 615 }, 616 "force": { 617 "required": false, 618 "default": false, 619 "description": "Whether to bypass trash and force deletion.", 620 "type": "boolean" 621 } 622 } 623 } 624 ] 625 }, 626 "/wp/v2/posts/(?P<parent>[\\d]+)/revisions": { 627 "namespace": "wp/v2", 628 "methods": [ 629 "GET" 630 ], 631 "endpoints": [ 632 { 633 "methods": [ 634 "GET" 635 ], 636 "args": { 637 "parent": { 638 "required": false, 639 "description": "The ID for the parent of the object.", 640 "type": "integer" 641 }, 642 "context": { 643 "required": false, 644 "default": "view", 645 "enum": [ 646 "view", 647 "embed", 648 "edit" 649 ], 650 "description": "Scope under which the request is made; determines fields present in response.", 651 "type": "string" 652 } 653 } 654 } 655 ] 656 }, 657 "/wp/v2/posts/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 658 "namespace": "wp/v2", 659 "methods": [ 660 "GET", 661 "DELETE" 662 ], 663 "endpoints": [ 664 { 665 "methods": [ 666 "GET" 667 ], 668 "args": { 669 "parent": { 670 "required": false, 671 "description": "The ID for the parent of the object.", 672 "type": "integer" 673 }, 674 "id": { 675 "required": false, 676 "description": "Unique identifier for the object.", 677 "type": "integer" 678 }, 679 "context": { 680 "required": false, 681 "default": "view", 682 "enum": [ 683 "view", 684 "embed", 685 "edit" 686 ], 687 "description": "Scope under which the request is made; determines fields present in response.", 688 "type": "string" 689 } 690 } 691 }, 692 { 693 "methods": [ 694 "DELETE" 695 ], 696 "args": { 697 "parent": { 698 "required": false, 699 "description": "The ID for the parent of the object.", 700 "type": "integer" 701 }, 702 "id": { 703 "required": false, 704 "description": "Unique identifier for the object.", 705 "type": "integer" 706 }, 707 "force": { 708 "required": false, 709 "default": false, 710 "description": "Required to be true, as revisions do not support trashing.", 711 "type": "boolean" 712 } 713 } 714 } 715 ] 716 }, 717 "/wp/v2/pages": { 718 "namespace": "wp/v2", 719 "methods": [ 720 "GET", 721 "POST" 722 ], 723 "endpoints": [ 724 { 725 "methods": [ 726 "GET" 727 ], 728 "args": { 729 "context": { 730 "required": false, 731 "default": "view", 732 "enum": [ 733 "view", 734 "embed", 735 "edit" 736 ], 737 "description": "Scope under which the request is made; determines fields present in response.", 738 "type": "string" 739 }, 740 "page": { 741 "required": false, 742 "default": 1, 743 "description": "Current page of the collection.", 744 "type": "integer" 745 }, 746 "per_page": { 747 "required": false, 748 "default": 10, 749 "description": "Maximum number of items to be returned in result set.", 750 "type": "integer" 751 }, 752 "search": { 753 "required": false, 754 "description": "Limit results to those matching a string.", 755 "type": "string" 756 }, 757 "after": { 758 "required": false, 759 "description": "Limit response to posts published after a given ISO8601 compliant date.", 760 "type": "string" 761 }, 762 "author": { 763 "required": false, 764 "default": [], 765 "description": "Limit result set to posts assigned to specific authors.", 766 "type": "array", 767 "items": { 768 "type": "integer" 769 } 770 }, 771 "author_exclude": { 772 "required": false, 773 "default": [], 774 "description": "Ensure result set excludes posts assigned to specific authors.", 775 "type": "array", 776 "items": { 777 "type": "integer" 778 } 779 }, 780 "before": { 781 "required": false, 782 "description": "Limit response to posts published before a given ISO8601 compliant date.", 783 "type": "string" 784 }, 785 "exclude": { 786 "required": false, 787 "default": [], 788 "description": "Ensure result set excludes specific IDs.", 789 "type": "array", 790 "items": { 791 "type": "integer" 792 } 793 }, 794 "include": { 795 "required": false, 796 "default": [], 797 "description": "Limit result set to specific IDs.", 798 "type": "array", 799 "items": { 800 "type": "integer" 801 } 802 }, 803 "menu_order": { 804 "required": false, 805 "description": "Limit result set to posts with a specific menu_order value.", 806 "type": "integer" 807 }, 808 "offset": { 809 "required": false, 810 "description": "Offset the result set by a specific number of items.", 811 "type": "integer" 812 }, 813 "order": { 814 "required": false, 815 "default": "desc", 816 "enum": [ 817 "asc", 818 "desc" 819 ], 820 "description": "Order sort attribute ascending or descending.", 821 "type": "string" 822 }, 823 "orderby": { 824 "required": false, 825 "default": "date", 826 "enum": [ 827 "date", 828 "relevance", 829 "id", 830 "include", 831 "title", 832 "slug", 833 "menu_order" 834 ], 835 "description": "Sort collection by object attribute.", 836 "type": "string" 837 }, 838 "parent": { 839 "required": false, 840 "default": [], 841 "description": "Limit result set to those of particular parent IDs.", 842 "type": "array", 843 "items": { 844 "type": "integer" 845 } 846 }, 847 "parent_exclude": { 848 "required": false, 849 "default": [], 850 "description": "Limit result set to all items except those of a particular parent ID.", 851 "type": "array", 852 "items": { 853 "type": "integer" 854 } 855 }, 856 "slug": { 857 "required": false, 858 "description": "Limit result set to posts with one or more specific slugs.", 859 "type": "array", 860 "items": { 861 "type": "string" 862 } 863 }, 864 "status": { 865 "required": false, 866 "default": "publish", 867 "description": "Limit result set to posts assigned one or more statuses.", 868 "type": "array", 869 "items": { 870 "enum": [ 871 "publish", 872 "future", 873 "draft", 874 "pending", 875 "private", 876 "trash", 877 "auto-draft", 878 "inherit", 879 "any" 880 ], 881 "type": "string" 882 } 883 } 884 } 885 }, 886 { 887 "methods": [ 888 "POST" 889 ], 890 "args": { 891 "date": { 892 "required": false, 893 "description": "The date the object was published, in the site's timezone.", 894 "type": "string" 895 }, 896 "date_gmt": { 897 "required": false, 898 "description": "The date the object was published, as GMT.", 899 "type": "string" 900 }, 901 "slug": { 902 "required": false, 903 "description": "An alphanumeric identifier for the object unique to its type.", 904 "type": "string" 905 }, 906 "status": { 907 "required": false, 908 "enum": [ 909 "publish", 910 "future", 911 "draft", 912 "pending", 913 "private" 914 ], 915 "description": "A named status for the object.", 916 "type": "string" 917 }, 918 "password": { 919 "required": false, 920 "description": "A password to protect access to the content and excerpt.", 921 "type": "string" 922 }, 923 "parent": { 924 "required": false, 925 "description": "The ID for the parent of the object.", 926 "type": "integer" 927 }, 928 "title": { 929 "required": false, 930 "description": "The title for the object.", 931 "type": "object" 932 }, 933 "content": { 934 "required": false, 935 "description": "The content for the object.", 936 "type": "object" 937 }, 938 "author": { 939 "required": false, 940 "description": "The ID for the author of the object.", 941 "type": "integer" 942 }, 943 "excerpt": { 944 "required": false, 945 "description": "The excerpt for the object.", 946 "type": "object" 947 }, 948 "featured_media": { 949 "required": false, 950 "description": "The ID of the featured media for the object.", 951 "type": "integer" 952 }, 953 "comment_status": { 954 "required": false, 955 "enum": [ 956 "open", 957 "closed" 958 ], 959 "description": "Whether or not comments are open on the object.", 960 "type": "string" 961 }, 962 "ping_status": { 963 "required": false, 964 "enum": [ 965 "open", 966 "closed" 967 ], 968 "description": "Whether or not the object can be pinged.", 969 "type": "string" 970 }, 971 "menu_order": { 972 "required": false, 973 "description": "The order of the object in relation to other object of its type.", 974 "type": "integer" 975 }, 976 "meta": { 977 "required": false, 978 "description": "Meta fields.", 979 "type": "object" 980 }, 981 "template": { 982 "required": false, 983 "enum": [ 984 "" 985 ], 986 "description": "The theme file to use to display the object.", 987 "type": "string" 988 } 989 } 990 } 991 ], 992 "_links": { 993 "self": "http://example.org/?rest_route=/wp/v2/pages" 994 } 995 }, 996 "/wp/v2/pages/(?P<id>[\\d]+)": { 997 "namespace": "wp/v2", 998 "methods": [ 999 "GET", 1000 "POST", 1001 "PUT", 1002 "PATCH", 1003 "DELETE" 1004 ], 1005 "endpoints": [ 1006 { 1007 "methods": [ 1008 "GET" 1009 ], 1010 "args": { 1011 "id": { 1012 "required": false, 1013 "description": "Unique identifier for the object.", 1014 "type": "integer" 1015 }, 1016 "context": { 1017 "required": false, 1018 "default": "view", 1019 "enum": [ 1020 "view", 1021 "embed", 1022 "edit" 1023 ], 1024 "description": "Scope under which the request is made; determines fields present in response.", 1025 "type": "string" 1026 }, 1027 "password": { 1028 "required": false, 1029 "description": "The password for the post if it is password protected.", 1030 "type": "string" 1031 } 1032 } 1033 }, 1034 { 1035 "methods": [ 1036 "POST", 1037 "PUT", 1038 "PATCH" 1039 ], 1040 "args": { 1041 "id": { 1042 "required": false, 1043 "description": "Unique identifier for the object.", 1044 "type": "integer" 1045 }, 1046 "date": { 1047 "required": false, 1048 "description": "The date the object was published, in the site's timezone.", 1049 "type": "string" 1050 }, 1051 "date_gmt": { 1052 "required": false, 1053 "description": "The date the object was published, as GMT.", 1054 "type": "string" 1055 }, 1056 "slug": { 1057 "required": false, 1058 "description": "An alphanumeric identifier for the object unique to its type.", 1059 "type": "string" 1060 }, 1061 "status": { 1062 "required": false, 1063 "enum": [ 1064 "publish", 1065 "future", 1066 "draft", 1067 "pending", 1068 "private" 1069 ], 1070 "description": "A named status for the object.", 1071 "type": "string" 1072 }, 1073 "password": { 1074 "required": false, 1075 "description": "A password to protect access to the content and excerpt.", 1076 "type": "string" 1077 }, 1078 "parent": { 1079 "required": false, 1080 "description": "The ID for the parent of the object.", 1081 "type": "integer" 1082 }, 1083 "title": { 1084 "required": false, 1085 "description": "The title for the object.", 1086 "type": "object" 1087 }, 1088 "content": { 1089 "required": false, 1090 "description": "The content for the object.", 1091 "type": "object" 1092 }, 1093 "author": { 1094 "required": false, 1095 "description": "The ID for the author of the object.", 1096 "type": "integer" 1097 }, 1098 "excerpt": { 1099 "required": false, 1100 "description": "The excerpt for the object.", 1101 "type": "object" 1102 }, 1103 "featured_media": { 1104 "required": false, 1105 "description": "The ID of the featured media for the object.", 1106 "type": "integer" 1107 }, 1108 "comment_status": { 1109 "required": false, 1110 "enum": [ 1111 "open", 1112 "closed" 1113 ], 1114 "description": "Whether or not comments are open on the object.", 1115 "type": "string" 1116 }, 1117 "ping_status": { 1118 "required": false, 1119 "enum": [ 1120 "open", 1121 "closed" 1122 ], 1123 "description": "Whether or not the object can be pinged.", 1124 "type": "string" 1125 }, 1126 "menu_order": { 1127 "required": false, 1128 "description": "The order of the object in relation to other object of its type.", 1129 "type": "integer" 1130 }, 1131 "meta": { 1132 "required": false, 1133 "description": "Meta fields.", 1134 "type": "object" 1135 }, 1136 "template": { 1137 "required": false, 1138 "enum": [ 1139 "" 1140 ], 1141 "description": "The theme file to use to display the object.", 1142 "type": "string" 1143 } 1144 } 1145 }, 1146 { 1147 "methods": [ 1148 "DELETE" 1149 ], 1150 "args": { 1151 "id": { 1152 "required": false, 1153 "description": "Unique identifier for the object.", 1154 "type": "integer" 1155 }, 1156 "force": { 1157 "required": false, 1158 "default": false, 1159 "description": "Whether to bypass trash and force deletion.", 1160 "type": "boolean" 1161 } 1162 } 1163 } 1164 ] 1165 }, 1166 "/wp/v2/pages/(?P<parent>[\\d]+)/revisions": { 1167 "namespace": "wp/v2", 1168 "methods": [ 1169 "GET" 1170 ], 1171 "endpoints": [ 1172 { 1173 "methods": [ 1174 "GET" 1175 ], 1176 "args": { 1177 "parent": { 1178 "required": false, 1179 "description": "The ID for the parent of the object.", 1180 "type": "integer" 1181 }, 1182 "context": { 1183 "required": false, 1184 "default": "view", 1185 "enum": [ 1186 "view", 1187 "embed", 1188 "edit" 1189 ], 1190 "description": "Scope under which the request is made; determines fields present in response.", 1191 "type": "string" 1192 } 1193 } 1194 } 1195 ] 1196 }, 1197 "/wp/v2/pages/(?P<parent>[\\d]+)/revisions/(?P<id>[\\d]+)": { 1198 "namespace": "wp/v2", 1199 "methods": [ 1200 "GET", 1201 "DELETE" 1202 ], 1203 "endpoints": [ 1204 { 1205 "methods": [ 1206 "GET" 1207 ], 1208 "args": { 1209 "parent": { 1210 "required": false, 1211 "description": "The ID for the parent of the object.", 1212 "type": "integer" 1213 }, 1214 "id": { 1215 "required": false, 1216 "description": "Unique identifier for the object.", 1217 "type": "integer" 1218 }, 1219 "context": { 1220 "required": false, 1221 "default": "view", 1222 "enum": [ 1223 "view", 1224 "embed", 1225 "edit" 1226 ], 1227 "description": "Scope under which the request is made; determines fields present in response.", 1228 "type": "string" 1229 } 1230 } 1231 }, 1232 { 1233 "methods": [ 1234 "DELETE" 1235 ], 1236 "args": { 1237 "parent": { 1238 "required": false, 1239 "description": "The ID for the parent of the object.", 1240 "type": "integer" 1241 }, 1242 "id": { 1243 "required": false, 1244 "description": "Unique identifier for the object.", 1245 "type": "integer" 1246 }, 1247 "force": { 1248 "required": false, 1249 "default": false, 1250 "description": "Required to be true, as revisions do not support trashing.", 1251 "type": "boolean" 1252 } 1253 } 1254 } 1255 ] 1256 }, 1257 "/wp/v2/media": { 1258 "namespace": "wp/v2", 1259 "methods": [ 1260 "GET", 1261 "POST" 1262 ], 1263 "endpoints": [ 1264 { 1265 "methods": [ 1266 "GET" 1267 ], 1268 "args": { 1269 "context": { 1270 "required": false, 1271 "default": "view", 1272 "enum": [ 1273 "view", 1274 "embed", 1275 "edit" 1276 ], 1277 "description": "Scope under which the request is made; determines fields present in response.", 1278 "type": "string" 1279 }, 1280 "page": { 1281 "required": false, 1282 "default": 1, 1283 "description": "Current page of the collection.", 1284 "type": "integer" 1285 }, 1286 "per_page": { 1287 "required": false, 1288 "default": 10, 1289 "description": "Maximum number of items to be returned in result set.", 1290 "type": "integer" 1291 }, 1292 "search": { 1293 "required": false, 1294 "description": "Limit results to those matching a string.", 1295 "type": "string" 1296 }, 1297 "after": { 1298 "required": false, 1299 "description": "Limit response to posts published after a given ISO8601 compliant date.", 1300 "type": "string" 1301 }, 1302 "author": { 1303 "required": false, 1304 "default": [], 1305 "description": "Limit result set to posts assigned to specific authors.", 1306 "type": "array", 1307 "items": { 1308 "type": "integer" 1309 } 1310 }, 1311 "author_exclude": { 1312 "required": false, 1313 "default": [], 1314 "description": "Ensure result set excludes posts assigned to specific authors.", 1315 "type": "array", 1316 "items": { 1317 "type": "integer" 1318 } 1319 }, 1320 "before": { 1321 "required": false, 1322 "description": "Limit response to posts published before a given ISO8601 compliant date.", 1323 "type": "string" 1324 }, 1325 "exclude": { 1326 "required": false, 1327 "default": [], 1328 "description": "Ensure result set excludes specific IDs.", 1329 "type": "array", 1330 "items": { 1331 "type": "integer" 1332 } 1333 }, 1334 "include": { 1335 "required": false, 1336 "default": [], 1337 "description": "Limit result set to specific IDs.", 1338 "type": "array", 1339 "items": { 1340 "type": "integer" 1341 } 1342 }, 1343 "offset": { 1344 "required": false, 1345 "description": "Offset the result set by a specific number of items.", 1346 "type": "integer" 1347 }, 1348 "order": { 1349 "required": false, 1350 "default": "desc", 1351 "enum": [ 1352 "asc", 1353 "desc" 1354 ], 1355 "description": "Order sort attribute ascending or descending.", 1356 "type": "string" 1357 }, 1358 "orderby": { 1359 "required": false, 1360 "default": "date", 1361 "enum": [ 1362 "date", 1363 "relevance", 1364 "id", 1365 "include", 1366 "title", 1367 "slug" 1368 ], 1369 "description": "Sort collection by object attribute.", 1370 "type": "string" 1371 }, 1372 "parent": { 1373 "required": false, 1374 "default": [], 1375 "description": "Limit result set to those of particular parent IDs.", 1376 "type": "array", 1377 "items": { 1378 "type": "integer" 1379 } 1380 }, 1381 "parent_exclude": { 1382 "required": false, 1383 "default": [], 1384 "description": "Limit result set to all items except those of a particular parent ID.", 1385 "type": "array", 1386 "items": { 1387 "type": "integer" 1388 } 1389 }, 1390 "slug": { 1391 "required": false, 1392 "description": "Limit result set to posts with one or more specific slugs.", 1393 "type": "array", 1394 "items": { 1395 "type": "string" 1396 } 1397 }, 1398 "status": { 1399 "required": false, 1400 "default": "inherit", 1401 "description": "Limit result set to posts assigned one or more statuses.", 1402 "type": "array", 1403 "items": { 1404 "enum": [ 1405 "inherit", 1406 "private", 1407 "trash" 1408 ], 1409 "type": "string" 1410 } 1411 }, 1412 "media_type": { 1413 "required": false, 1414 "enum": [ 1415 "image", 1416 "video", 1417 "text", 1418 "application", 1419 "audio" 1420 ], 1421 "description": "Limit result set to attachments of a particular media type.", 1422 "type": "string" 1423 }, 1424 "mime_type": { 1425 "required": false, 1426 "description": "Limit result set to attachments of a particular MIME type.", 1427 "type": "string" 1428 } 1429 } 1430 }, 1431 { 1432 "methods": [ 1433 "POST" 1434 ], 1435 "args": { 1436 "date": { 1437 "required": false, 1438 "description": "The date the object was published, in the site's timezone.", 1439 "type": "string" 1440 }, 1441 "date_gmt": { 1442 "required": false, 1443 "description": "The date the object was published, as GMT.", 1444 "type": "string" 1445 }, 1446 "slug": { 1447 "required": false, 1448 "description": "An alphanumeric identifier for the object unique to its type.", 1449 "type": "string" 1450 }, 1451 "status": { 1452 "required": false, 1453 "enum": [ 1454 "publish", 1455 "future", 1456 "draft", 1457 "pending", 1458 "private" 1459 ], 1460 "description": "A named status for the object.", 1461 "type": "string" 1462 }, 1463 "title": { 1464 "required": false, 1465 "description": "The title for the object.", 1466 "type": "object" 1467 }, 1468 "author": { 1469 "required": false, 1470 "description": "The ID for the author of the object.", 1471 "type": "integer" 1472 }, 1473 "comment_status": { 1474 "required": false, 1475 "enum": [ 1476 "open", 1477 "closed" 1478 ], 1479 "description": "Whether or not comments are open on the object.", 1480 "type": "string" 1481 }, 1482 "ping_status": { 1483 "required": false, 1484 "enum": [ 1485 "open", 1486 "closed" 1487 ], 1488 "description": "Whether or not the object can be pinged.", 1489 "type": "string" 1490 }, 1491 "meta": { 1492 "required": false, 1493 "description": "Meta fields.", 1494 "type": "object" 1495 }, 1496 "template": { 1497 "required": false, 1498 "enum": [ 1499 "" 1500 ], 1501 "description": "The theme file to use to display the object.", 1502 "type": "string" 1503 }, 1504 "alt_text": { 1505 "required": false, 1506 "description": "Alternative text to display when attachment is not displayed.", 1507 "type": "string" 1508 }, 1509 "caption": { 1510 "required": false, 1511 "description": "The attachment caption.", 1512 "type": "object" 1513 }, 1514 "description": { 1515 "required": false, 1516 "description": "The attachment description.", 1517 "type": "object" 1518 }, 1519 "post": { 1520 "required": false, 1521 "description": "The ID for the associated post of the attachment.", 1522 "type": "integer" 1523 } 1524 } 1525 } 1526 ], 1527 "_links": { 1528 "self": "http://example.org/?rest_route=/wp/v2/media" 1529 } 1530 }, 1531 "/wp/v2/media/(?P<id>[\\d]+)": { 1532 "namespace": "wp/v2", 1533 "methods": [ 1534 "GET", 1535 "POST", 1536 "PUT", 1537 "PATCH", 1538 "DELETE" 1539 ], 1540 "endpoints": [ 1541 { 1542 "methods": [ 1543 "GET" 1544 ], 1545 "args": { 1546 "id": { 1547 "required": false, 1548 "description": "Unique identifier for the object.", 1549 "type": "integer" 1550 }, 1551 "context": { 1552 "required": false, 1553 "default": "view", 1554 "enum": [ 1555 "view", 1556 "embed", 1557 "edit" 1558 ], 1559 "description": "Scope under which the request is made; determines fields present in response.", 1560 "type": "string" 1561 } 1562 } 1563 }, 1564 { 1565 "methods": [ 1566 "POST", 1567 "PUT", 1568 "PATCH" 1569 ], 1570 "args": { 1571 "id": { 1572 "required": false, 1573 "description": "Unique identifier for the object.", 1574 "type": "integer" 1575 }, 1576 "date": { 1577 "required": false, 1578 "description": "The date the object was published, in the site's timezone.", 1579 "type": "string" 1580 }, 1581 "date_gmt": { 1582 "required": false, 1583 "description": "The date the object was published, as GMT.", 1584 "type": "string" 1585 }, 1586 "slug": { 1587 "required": false, 1588 "description": "An alphanumeric identifier for the object unique to its type.", 1589 "type": "string" 1590 }, 1591 "status": { 1592 "required": false, 1593 "enum": [ 1594 "publish", 1595 "future", 1596 "draft", 1597 "pending", 1598 "private" 1599 ], 1600 "description": "A named status for the object.", 1601 "type": "string" 1602 }, 1603 "title": { 1604 "required": false, 1605 "description": "The title for the object.", 1606 "type": "object" 1607 }, 1608 "author": { 1609 "required": false, 1610 "description": "The ID for the author of the object.", 1611 "type": "integer" 1612 }, 1613 "comment_status": { 1614 "required": false, 1615 "enum": [ 1616 "open", 1617 "closed" 1618 ], 1619 "description": "Whether or not comments are open on the object.", 1620 "type": "string" 1621 }, 1622 "ping_status": { 1623 "required": false, 1624 "enum": [ 1625 "open", 1626 "closed" 1627 ], 1628 "description": "Whether or not the object can be pinged.", 1629 "type": "string" 1630 }, 1631 "meta": { 1632 "required": false, 1633 "description": "Meta fields.", 1634 "type": "object" 1635 }, 1636 "template": { 1637 "required": false, 1638 "enum": [ 1639 "" 1640 ], 1641 "description": "The theme file to use to display the object.", 1642 "type": "string" 1643 }, 1644 "alt_text": { 1645 "required": false, 1646 "description": "Alternative text to display when attachment is not displayed.", 1647 "type": "string" 1648 }, 1649 "caption": { 1650 "required": false, 1651 "description": "The attachment caption.", 1652 "type": "object" 1653 }, 1654 "description": { 1655 "required": false, 1656 "description": "The attachment description.", 1657 "type": "object" 1658 }, 1659 "post": { 1660 "required": false, 1661 "description": "The ID for the associated post of the attachment.", 1662 "type": "integer" 1663 } 1664 } 1665 }, 1666 { 1667 "methods": [ 1668 "DELETE" 1669 ], 1670 "args": { 1671 "id": { 1672 "required": false, 1673 "description": "Unique identifier for the object.", 1674 "type": "integer" 1675 }, 1676 "force": { 1677 "required": false, 1678 "default": false, 1679 "description": "Whether to bypass trash and force deletion.", 1680 "type": "boolean" 1681 } 1682 } 1683 } 1684 ] 1685 }, 1686 "/wp/v2/types": { 1687 "namespace": "wp/v2", 1688 "methods": [ 1689 "GET" 1690 ], 1691 "endpoints": [ 1692 { 1693 "methods": [ 1694 "GET" 1695 ], 1696 "args": { 1697 "context": { 1698 "required": false, 1699 "default": "view", 1700 "enum": [ 1701 "view", 1702 "embed", 1703 "edit" 1704 ], 1705 "description": "Scope under which the request is made; determines fields present in response.", 1706 "type": "string" 1707 } 1708 } 1709 } 1710 ], 1711 "_links": { 1712 "self": "http://example.org/?rest_route=/wp/v2/types" 1713 } 1714 }, 1715 "/wp/v2/types/(?P<type>[\\w-]+)": { 1716 "namespace": "wp/v2", 1717 "methods": [ 1718 "GET" 1719 ], 1720 "endpoints": [ 1721 { 1722 "methods": [ 1723 "GET" 1724 ], 1725 "args": { 1726 "type": { 1727 "required": false, 1728 "description": "An alphanumeric identifier for the post type.", 1729 "type": "string" 1730 }, 1731 "context": { 1732 "required": false, 1733 "default": "view", 1734 "enum": [ 1735 "view", 1736 "embed", 1737 "edit" 1738 ], 1739 "description": "Scope under which the request is made; determines fields present in response.", 1740 "type": "string" 1741 } 1742 } 1743 } 1744 ] 1745 }, 1746 "/wp/v2/statuses": { 1747 "namespace": "wp/v2", 1748 "methods": [ 1749 "GET" 1750 ], 1751 "endpoints": [ 1752 { 1753 "methods": [ 1754 "GET" 1755 ], 1756 "args": { 1757 "context": { 1758 "required": false, 1759 "default": "view", 1760 "enum": [ 1761 "view", 1762 "embed", 1763 "edit" 1764 ], 1765 "description": "Scope under which the request is made; determines fields present in response.", 1766 "type": "string" 1767 } 1768 } 1769 } 1770 ], 1771 "_links": { 1772 "self": "http://example.org/?rest_route=/wp/v2/statuses" 1773 } 1774 }, 1775 "/wp/v2/statuses/(?P<status>[\\w-]+)": { 1776 "namespace": "wp/v2", 1777 "methods": [ 1778 "GET" 1779 ], 1780 "endpoints": [ 1781 { 1782 "methods": [ 1783 "GET" 1784 ], 1785 "args": { 1786 "status": { 1787 "required": false, 1788 "description": "An alphanumeric identifier for the status.", 1789 "type": "string" 1790 }, 1791 "context": { 1792 "required": false, 1793 "default": "view", 1794 "enum": [ 1795 "view", 1796 "embed", 1797 "edit" 1798 ], 1799 "description": "Scope under which the request is made; determines fields present in response.", 1800 "type": "string" 1801 } 1802 } 1803 } 1804 ] 1805 }, 1806 "/wp/v2/taxonomies": { 1807 "namespace": "wp/v2", 1808 "methods": [ 1809 "GET" 1810 ], 1811 "endpoints": [ 1812 { 1813 "methods": [ 1814 "GET" 1815 ], 1816 "args": { 1817 "context": { 1818 "required": false, 1819 "default": "view", 1820 "enum": [ 1821 "view", 1822 "embed", 1823 "edit" 1824 ], 1825 "description": "Scope under which the request is made; determines fields present in response.", 1826 "type": "string" 1827 }, 1828 "type": { 1829 "required": false, 1830 "description": "Limit results to taxonomies associated with a specific post type.", 1831 "type": "string" 1832 } 1833 } 1834 } 1835 ], 1836 "_links": { 1837 "self": "http://example.org/?rest_route=/wp/v2/taxonomies" 1838 } 1839 }, 1840 "/wp/v2/taxonomies/(?P<taxonomy>[\\w-]+)": { 1841 "namespace": "wp/v2", 1842 "methods": [ 1843 "GET" 1844 ], 1845 "endpoints": [ 1846 { 1847 "methods": [ 1848 "GET" 1849 ], 1850 "args": { 1851 "taxonomy": { 1852 "required": false, 1853 "description": "An alphanumeric identifier for the taxonomy.", 1854 "type": "string" 1855 }, 1856 "context": { 1857 "required": false, 1858 "default": "view", 1859 "enum": [ 1860 "view", 1861 "embed", 1862 "edit" 1863 ], 1864 "description": "Scope under which the request is made; determines fields present in response.", 1865 "type": "string" 1866 } 1867 } 1868 } 1869 ] 1870 }, 1871 "/wp/v2/categories": { 1872 "namespace": "wp/v2", 1873 "methods": [ 1874 "GET", 1875 "POST" 1876 ], 1877 "endpoints": [ 1878 { 1879 "methods": [ 1880 "GET" 1881 ], 1882 "args": { 1883 "context": { 1884 "required": false, 1885 "default": "view", 1886 "enum": [ 1887 "view", 1888 "embed", 1889 "edit" 1890 ], 1891 "description": "Scope under which the request is made; determines fields present in response.", 1892 "type": "string" 1893 }, 1894 "page": { 1895 "required": false, 1896 "default": 1, 1897 "description": "Current page of the collection.", 1898 "type": "integer" 1899 }, 1900 "per_page": { 1901 "required": false, 1902 "default": 10, 1903 "description": "Maximum number of items to be returned in result set.", 1904 "type": "integer" 1905 }, 1906 "search": { 1907 "required": false, 1908 "description": "Limit results to those matching a string.", 1909 "type": "string" 1910 }, 1911 "exclude": { 1912 "required": false, 1913 "default": [], 1914 "description": "Ensure result set excludes specific IDs.", 1915 "type": "array", 1916 "items": { 1917 "type": "integer" 1918 } 1919 }, 1920 "include": { 1921 "required": false, 1922 "default": [], 1923 "description": "Limit result set to specific IDs.", 1924 "type": "array", 1925 "items": { 1926 "type": "integer" 1927 } 1928 }, 1929 "order": { 1930 "required": false, 1931 "default": "asc", 1932 "enum": [ 1933 "asc", 1934 "desc" 1935 ], 1936 "description": "Order sort attribute ascending or descending.", 1937 "type": "string" 1938 }, 1939 "orderby": { 1940 "required": false, 1941 "default": "name", 1942 "enum": [ 1943 "id", 1944 "include", 1945 "name", 1946 "slug", 1947 "term_group", 1948 "description", 1949 "count" 1950 ], 1951 "description": "Sort collection by term attribute.", 1952 "type": "string" 1953 }, 1954 "hide_empty": { 1955 "required": false, 1956 "default": false, 1957 "description": "Whether to hide terms not assigned to any posts.", 1958 "type": "boolean" 1959 }, 1960 "parent": { 1961 "required": false, 1962 "description": "Limit result set to terms assigned to a specific parent.", 1963 "type": "integer" 1964 }, 1965 "post": { 1966 "required": false, 1967 "description": "Limit result set to terms assigned to a specific post.", 1968 "type": "integer" 1969 }, 1970 "slug": { 1971 "required": false, 1972 "description": "Limit result set to terms with a specific slug.", 1973 "type": "string" 1974 } 1975 } 1976 }, 1977 { 1978 "methods": [ 1979 "POST" 1980 ], 1981 "args": { 1982 "description": { 1983 "required": false, 1984 "description": "HTML description of the term.", 1985 "type": "string" 1986 }, 1987 "name": { 1988 "required": true, 1989 "description": "HTML title for the term.", 1990 "type": "string" 1991 }, 1992 "slug": { 1993 "required": false, 1994 "description": "An alphanumeric identifier for the term unique to its type.", 1995 "type": "string" 1996 }, 1997 "parent": { 1998 "required": false, 1999 "description": "The parent term ID.", 2000 "type": "integer" 2001 }, 2002 "meta": { 2003 "required": false, 2004 "description": "Meta fields.", 2005 "type": "object" 2006 } 2007 } 2008 } 2009 ], 2010 "_links": { 2011 "self": "http://example.org/?rest_route=/wp/v2/categories" 2012 } 2013 }, 2014 "/wp/v2/categories/(?P<id>[\\d]+)": { 2015 "namespace": "wp/v2", 2016 "methods": [ 2017 "GET", 2018 "POST", 2019 "PUT", 2020 "PATCH", 2021 "DELETE" 2022 ], 2023 "endpoints": [ 2024 { 2025 "methods": [ 2026 "GET" 2027 ], 2028 "args": { 2029 "id": { 2030 "required": false, 2031 "description": "Unique identifier for the term.", 2032 "type": "integer" 2033 }, 2034 "context": { 2035 "required": false, 2036 "default": "view", 2037 "enum": [ 2038 "view", 2039 "embed", 2040 "edit" 2041 ], 2042 "description": "Scope under which the request is made; determines fields present in response.", 2043 "type": "string" 2044 } 2045 } 2046 }, 2047 { 2048 "methods": [ 2049 "POST", 2050 "PUT", 2051 "PATCH" 2052 ], 2053 "args": { 2054 "id": { 2055 "required": false, 2056 "description": "Unique identifier for the term.", 2057 "type": "integer" 2058 }, 2059 "description": { 2060 "required": false, 2061 "description": "HTML description of the term.", 2062 "type": "string" 2063 }, 2064 "name": { 2065 "required": false, 2066 "description": "HTML title for the term.", 2067 "type": "string" 2068 }, 2069 "slug": { 2070 "required": false, 2071 "description": "An alphanumeric identifier for the term unique to its type.", 2072 "type": "string" 2073 }, 2074 "parent": { 2075 "required": false, 2076 "description": "The parent term ID.", 2077 "type": "integer" 2078 }, 2079 "meta": { 2080 "required": false, 2081 "description": "Meta fields.", 2082 "type": "object" 2083 } 2084 } 2085 }, 2086 { 2087 "methods": [ 2088 "DELETE" 2089 ], 2090 "args": { 2091 "id": { 2092 "required": false, 2093 "description": "Unique identifier for the term.", 2094 "type": "integer" 2095 }, 2096 "force": { 2097 "required": false, 2098 "default": false, 2099 "description": "Required to be true, as terms do not support trashing.", 2100 "type": "boolean" 2101 } 2102 } 2103 } 2104 ] 2105 }, 2106 "/wp/v2/tags": { 2107 "namespace": "wp/v2", 2108 "methods": [ 2109 "GET", 2110 "POST" 2111 ], 2112 "endpoints": [ 2113 { 2114 "methods": [ 2115 "GET" 2116 ], 2117 "args": { 2118 "context": { 2119 "required": false, 2120 "default": "view", 2121 "enum": [ 2122 "view", 2123 "embed", 2124 "edit" 2125 ], 2126 "description": "Scope under which the request is made; determines fields present in response.", 2127 "type": "string" 2128 }, 2129 "page": { 2130 "required": false, 2131 "default": 1, 2132 "description": "Current page of the collection.", 2133 "type": "integer" 2134 }, 2135 "per_page": { 2136 "required": false, 2137 "default": 10, 2138 "description": "Maximum number of items to be returned in result set.", 2139 "type": "integer" 2140 }, 2141 "search": { 2142 "required": false, 2143 "description": "Limit results to those matching a string.", 2144 "type": "string" 2145 }, 2146 "exclude": { 2147 "required": false, 2148 "default": [], 2149 "description": "Ensure result set excludes specific IDs.", 2150 "type": "array", 2151 "items": { 2152 "type": "integer" 2153 } 2154 }, 2155 "include": { 2156 "required": false, 2157 "default": [], 2158 "description": "Limit result set to specific IDs.", 2159 "type": "array", 2160 "items": { 2161 "type": "integer" 2162 } 2163 }, 2164 "offset": { 2165 "required": false, 2166 "description": "Offset the result set by a specific number of items.", 2167 "type": "integer" 2168 }, 2169 "order": { 2170 "required": false, 2171 "default": "asc", 2172 "enum": [ 2173 "asc", 2174 "desc" 2175 ], 2176 "description": "Order sort attribute ascending or descending.", 2177 "type": "string" 2178 }, 2179 "orderby": { 2180 "required": false, 2181 "default": "name", 2182 "enum": [ 2183 "id", 2184 "include", 2185 "name", 2186 "slug", 2187 "term_group", 2188 "description", 2189 "count" 2190 ], 2191 "description": "Sort collection by term attribute.", 2192 "type": "string" 2193 }, 2194 "hide_empty": { 2195 "required": false, 2196 "default": false, 2197 "description": "Whether to hide terms not assigned to any posts.", 2198 "type": "boolean" 2199 }, 2200 "post": { 2201 "required": false, 2202 "description": "Limit result set to terms assigned to a specific post.", 2203 "type": "integer" 2204 }, 2205 "slug": { 2206 "required": false, 2207 "description": "Limit result set to terms with a specific slug.", 2208 "type": "string" 2209 } 2210 } 2211 }, 2212 { 2213 "methods": [ 2214 "POST" 2215 ], 2216 "args": { 2217 "description": { 2218 "required": false, 2219 "description": "HTML description of the term.", 2220 "type": "string" 2221 }, 2222 "name": { 2223 "required": true, 2224 "description": "HTML title for the term.", 2225 "type": "string" 2226 }, 2227 "slug": { 2228 "required": false, 2229 "description": "An alphanumeric identifier for the term unique to its type.", 2230 "type": "string" 2231 }, 2232 "meta": { 2233 "required": false, 2234 "description": "Meta fields.", 2235 "type": "object" 2236 } 2237 } 2238 } 2239 ], 2240 "_links": { 2241 "self": "http://example.org/?rest_route=/wp/v2/tags" 2242 } 2243 }, 2244 "/wp/v2/tags/(?P<id>[\\d]+)": { 2245 "namespace": "wp/v2", 2246 "methods": [ 2247 "GET", 2248 "POST", 2249 "PUT", 2250 "PATCH", 2251 "DELETE" 2252 ], 2253 "endpoints": [ 2254 { 2255 "methods": [ 2256 "GET" 2257 ], 2258 "args": { 2259 "id": { 2260 "required": false, 2261 "description": "Unique identifier for the term.", 2262 "type": "integer" 2263 }, 2264 "context": { 2265 "required": false, 2266 "default": "view", 2267 "enum": [ 2268 "view", 2269 "embed", 2270 "edit" 2271 ], 2272 "description": "Scope under which the request is made; determines fields present in response.", 2273 "type": "string" 2274 } 2275 } 2276 }, 2277 { 2278 "methods": [ 2279 "POST", 2280 "PUT", 2281 "PATCH" 2282 ], 2283 "args": { 2284 "id": { 2285 "required": false, 2286 "description": "Unique identifier for the term.", 2287 "type": "integer" 2288 }, 2289 "description": { 2290 "required": false, 2291 "description": "HTML description of the term.", 2292 "type": "string" 2293 }, 2294 "name": { 2295 "required": false, 2296 "description": "HTML title for the term.", 2297 "type": "string" 2298 }, 2299 "slug": { 2300 "required": false, 2301 "description": "An alphanumeric identifier for the term unique to its type.", 2302 "type": "string" 2303 }, 2304 "meta": { 2305 "required": false, 2306 "description": "Meta fields.", 2307 "type": "object" 2308 } 2309 } 2310 }, 2311 { 2312 "methods": [ 2313 "DELETE" 2314 ], 2315 "args": { 2316 "id": { 2317 "required": false, 2318 "description": "Unique identifier for the term.", 2319 "type": "integer" 2320 }, 2321 "force": { 2322 "required": false, 2323 "default": false, 2324 "description": "Required to be true, as terms do not support trashing.", 2325 "type": "boolean" 2326 } 2327 } 2328 } 2329 ] 2330 }, 2331 "/wp/v2/users": { 2332 "namespace": "wp/v2", 2333 "methods": [ 2334 "GET", 2335 "POST" 2336 ], 2337 "endpoints": [ 2338 { 2339 "methods": [ 2340 "GET" 2341 ], 2342 "args": { 2343 "context": { 2344 "required": false, 2345 "default": "view", 2346 "enum": [ 2347 "view", 2348 "embed", 2349 "edit" 2350 ], 2351 "description": "Scope under which the request is made; determines fields present in response.", 2352 "type": "string" 2353 }, 2354 "page": { 2355 "required": false, 2356 "default": 1, 2357 "description": "Current page of the collection.", 2358 "type": "integer" 2359 }, 2360 "per_page": { 2361 "required": false, 2362 "default": 10, 2363 "description": "Maximum number of items to be returned in result set.", 2364 "type": "integer" 2365 }, 2366 "search": { 2367 "required": false, 2368 "description": "Limit results to those matching a string.", 2369 "type": "string" 2370 }, 2371 "exclude": { 2372 "required": false, 2373 "default": [], 2374 "description": "Ensure result set excludes specific IDs.", 2375 "type": "array", 2376 "items": { 2377 "type": "integer" 2378 } 2379 }, 2380 "include": { 2381 "required": false, 2382 "default": [], 2383 "description": "Limit result set to specific IDs.", 2384 "type": "array", 2385 "items": { 2386 "type": "integer" 2387 } 2388 }, 2389 "offset": { 2390 "required": false, 2391 "description": "Offset the result set by a specific number of items.", 2392 "type": "integer" 2393 }, 2394 "order": { 2395 "required": false, 2396 "default": "asc", 2397 "enum": [ 2398 "asc", 2399 "desc" 2400 ], 2401 "description": "Order sort attribute ascending or descending.", 2402 "type": "string" 2403 }, 2404 "orderby": { 2405 "required": false, 2406 "default": "name", 2407 "enum": [ 2408 "id", 2409 "include", 2410 "name", 2411 "registered_date", 2412 "slug", 2413 "email", 2414 "url" 2415 ], 2416 "description": "Sort collection by object attribute.", 2417 "type": "string" 2418 }, 2419 "slug": { 2420 "required": false, 2421 "description": "Limit result set to users with a specific slug.", 2422 "type": "string" 2423 }, 2424 "roles": { 2425 "required": false, 2426 "description": "Limit result set to users matching at least one specific role provided. Accepts csv list or single role.", 2427 "type": "array", 2428 "items": { 2429 "type": "string" 2430 } 2431 } 2432 } 2433 }, 2434 { 2435 "methods": [ 2436 "POST" 2437 ], 2438 "args": { 2439 "username": { 2440 "required": true, 2441 "description": "Login name for the user.", 2442 "type": "string" 2443 }, 2444 "name": { 2445 "required": false, 2446 "description": "Display name for the user.", 2447 "type": "string" 2448 }, 2449 "first_name": { 2450 "required": false, 2451 "description": "First name for the user.", 2452 "type": "string" 2453 }, 2454 "last_name": { 2455 "required": false, 2456 "description": "Last name for the user.", 2457 "type": "string" 2458 }, 2459 "email": { 2460 "required": true, 2461 "description": "The email address for the user.", 2462 "type": "string" 2463 }, 2464 "url": { 2465 "required": false, 2466 "description": "URL of the user.", 2467 "type": "string" 2468 }, 2469 "description": { 2470 "required": false, 2471 "description": "Description of the user.", 2472 "type": "string" 2473 }, 2474 "locale": { 2475 "required": false, 2476 "enum": [ 2477 "", 2478 "en_US", 2479 "de_DE", 2480 "en_GB", 2481 "es_ES" 2482 ], 2483 "description": "Locale for the user.", 2484 "type": "string" 2485 }, 2486 "nickname": { 2487 "required": false, 2488 "description": "The nickname for the user.", 2489 "type": "string" 2490 }, 2491 "slug": { 2492 "required": false, 2493 "description": "An alphanumeric identifier for the user.", 2494 "type": "string" 2495 }, 2496 "roles": { 2497 "required": false, 2498 "description": "Roles assigned to the user.", 2499 "type": "array", 2500 "items": { 2501 "type": "string" 2502 } 2503 }, 2504 "password": { 2505 "required": true, 2506 "description": "Password for the user (never included).", 2507 "type": "string" 2508 }, 2509 "meta": { 2510 "required": false, 2511 "description": "Meta fields.", 2512 "type": "object" 2513 } 2514 } 2515 } 2516 ], 2517 "_links": { 2518 "self": "http://example.org/?rest_route=/wp/v2/users" 2519 } 2520 }, 2521 "/wp/v2/users/(?P<id>[\\d]+)": { 2522 "namespace": "wp/v2", 2523 "methods": [ 2524 "GET", 2525 "POST", 2526 "PUT", 2527 "PATCH", 2528 "DELETE" 2529 ], 2530 "endpoints": [ 2531 { 2532 "methods": [ 2533 "GET" 2534 ], 2535 "args": { 2536 "id": { 2537 "required": false, 2538 "description": "Unique identifier for the user.", 2539 "type": "integer" 2540 }, 2541 "context": { 2542 "required": false, 2543 "default": "view", 2544 "enum": [ 2545 "view", 2546 "embed", 2547 "edit" 2548 ], 2549 "description": "Scope under which the request is made; determines fields present in response.", 2550 "type": "string" 2551 } 2552 } 2553 }, 2554 { 2555 "methods": [ 2556 "POST", 2557 "PUT", 2558 "PATCH" 2559 ], 2560 "args": { 2561 "id": { 2562 "required": false, 2563 "description": "Unique identifier for the user.", 2564 "type": "integer" 2565 }, 2566 "username": { 2567 "required": false, 2568 "description": "Login name for the user.", 2569 "type": "string" 2570 }, 2571 "name": { 2572 "required": false, 2573 "description": "Display name for the user.", 2574 "type": "string" 2575 }, 2576 "first_name": { 2577 "required": false, 2578 "description": "First name for the user.", 2579 "type": "string" 2580 }, 2581 "last_name": { 2582 "required": false, 2583 "description": "Last name for the user.", 2584 "type": "string" 2585 }, 2586 "email": { 2587 "required": false, 2588 "description": "The email address for the user.", 2589 "type": "string" 2590 }, 2591 "url": { 2592 "required": false, 2593 "description": "URL of the user.", 2594 "type": "string" 2595 }, 2596 "description": { 2597 "required": false, 2598 "description": "Description of the user.", 2599 "type": "string" 2600 }, 2601 "locale": { 2602 "required": false, 2603 "enum": [ 2604 "", 2605 "en_US", 2606 "de_DE", 2607 "en_GB", 2608 "es_ES" 2609 ], 2610 "description": "Locale for the user.", 2611 "type": "string" 2612 }, 2613 "nickname": { 2614 "required": false, 2615 "description": "The nickname for the user.", 2616 "type": "string" 2617 }, 2618 "slug": { 2619 "required": false, 2620 "description": "An alphanumeric identifier for the user.", 2621 "type": "string" 2622 }, 2623 "roles": { 2624 "required": false, 2625 "description": "Roles assigned to the user.", 2626 "type": "array", 2627 "items": { 2628 "type": "string" 2629 } 2630 }, 2631 "password": { 2632 "required": false, 2633 "description": "Password for the user (never included).", 2634 "type": "string" 2635 }, 2636 "meta": { 2637 "required": false, 2638 "description": "Meta fields.", 2639 "type": "object" 2640 } 2641 } 2642 }, 2643 { 2644 "methods": [ 2645 "DELETE" 2646 ], 2647 "args": { 2648 "id": { 2649 "required": false, 2650 "description": "Unique identifier for the user.", 2651 "type": "integer" 2652 }, 2653 "force": { 2654 "required": false, 2655 "default": false, 2656 "description": "Required to be true, as users do not support trashing.", 2657 "type": "boolean" 2658 }, 2659 "reassign": { 2660 "required": true, 2661 "description": "Reassign the deleted user's posts and links to this user ID.", 2662 "type": "integer" 2663 } 2664 } 2665 } 2666 ] 2667 }, 2668 "/wp/v2/users/me": { 2669 "namespace": "wp/v2", 2670 "methods": [ 2671 "GET", 2672 "POST", 2673 "PUT", 2674 "PATCH", 2675 "DELETE" 2676 ], 2677 "endpoints": [ 2678 { 2679 "methods": [ 2680 "GET" 2681 ], 2682 "args": { 2683 "context": { 2684 "required": false, 2685 "default": "view", 2686 "enum": [ 2687 "view", 2688 "embed", 2689 "edit" 2690 ], 2691 "description": "Scope under which the request is made; determines fields present in response.", 2692 "type": "string" 2693 } 2694 } 2695 }, 2696 { 2697 "methods": [ 2698 "POST", 2699 "PUT", 2700 "PATCH" 2701 ], 2702 "args": { 2703 "username": { 2704 "required": false, 2705 "description": "Login name for the user.", 2706 "type": "string" 2707 }, 2708 "name": { 2709 "required": false, 2710 "description": "Display name for the user.", 2711 "type": "string" 2712 }, 2713 "first_name": { 2714 "required": false, 2715 "description": "First name for the user.", 2716 "type": "string" 2717 }, 2718 "last_name": { 2719 "required": false, 2720 "description": "Last name for the user.", 2721 "type": "string" 2722 }, 2723 "email": { 2724 "required": false, 2725 "description": "The email address for the user.", 2726 "type": "string" 2727 }, 2728 "url": { 2729 "required": false, 2730 "description": "URL of the user.", 2731 "type": "string" 2732 }, 2733 "description": { 2734 "required": false, 2735 "description": "Description of the user.", 2736 "type": "string" 2737 }, 2738 "locale": { 2739 "required": false, 2740 "enum": [ 2741 "", 2742 "en_US", 2743 "de_DE", 2744 "en_GB", 2745 "es_ES" 2746 ], 2747 "description": "Locale for the user.", 2748 "type": "string" 2749 }, 2750 "nickname": { 2751 "required": false, 2752 "description": "The nickname for the user.", 2753 "type": "string" 2754 }, 2755 "slug": { 2756 "required": false, 2757 "description": "An alphanumeric identifier for the user.", 2758 "type": "string" 2759 }, 2760 "roles": { 2761 "required": false, 2762 "description": "Roles assigned to the user.", 2763 "type": "array", 2764 "items": { 2765 "type": "string" 2766 } 2767 }, 2768 "password": { 2769 "required": false, 2770 "description": "Password for the user (never included).", 2771 "type": "string" 2772 }, 2773 "meta": { 2774 "required": false, 2775 "description": "Meta fields.", 2776 "type": "object" 2777 } 2778 } 2779 }, 2780 { 2781 "methods": [ 2782 "DELETE" 2783 ], 2784 "args": { 2785 "force": { 2786 "required": false, 2787 "default": false, 2788 "description": "Required to be true, as users do not support trashing.", 2789 "type": "boolean" 2790 }, 2791 "reassign": { 2792 "required": true, 2793 "description": "Reassign the deleted user's posts and links to this user ID.", 2794 "type": "integer" 2795 } 2796 } 2797 } 2798 ], 2799 "_links": { 2800 "self": "http://example.org/?rest_route=/wp/v2/users/me" 2801 } 2802 }, 2803 "/wp/v2/comments": { 2804 "namespace": "wp/v2", 2805 "methods": [ 2806 "GET", 2807 "POST" 2808 ], 2809 "endpoints": [ 2810 { 2811 "methods": [ 2812 "GET" 2813 ], 2814 "args": { 2815 "context": { 2816 "required": false, 2817 "default": "view", 2818 "enum": [ 2819 "view", 2820 "embed", 2821 "edit" 2822 ], 2823 "description": "Scope under which the request is made; determines fields present in response.", 2824 "type": "string" 2825 }, 2826 "page": { 2827 "required": false, 2828 "default": 1, 2829 "description": "Current page of the collection.", 2830 "type": "integer" 2831 }, 2832 "per_page": { 2833 "required": false, 2834 "default": 10, 2835 "description": "Maximum number of items to be returned in result set.", 2836 "type": "integer" 2837 }, 2838 "search": { 2839 "required": false, 2840 "description": "Limit results to those matching a string.", 2841 "type": "string" 2842 }, 2843 "after": { 2844 "required": false, 2845 "description": "Limit response to comments published after a given ISO8601 compliant date.", 2846 "type": "string" 2847 }, 2848 "author": { 2849 "required": false, 2850 "description": "Limit result set to comments assigned to specific user IDs. Requires authorization.", 2851 "type": "array", 2852 "items": { 2853 "type": "integer" 2854 } 2855 }, 2856 "author_exclude": { 2857 "required": false, 2858 "description": "Ensure result set excludes comments assigned to specific user IDs. Requires authorization.", 2859 "type": "array", 2860 "items": { 2861 "type": "integer" 2862 } 2863 }, 2864 "author_email": { 2865 "required": false, 2866 "description": "Limit result set to that from a specific author email. Requires authorization.", 2867 "type": "string" 2868 }, 2869 "before": { 2870 "required": false, 2871 "description": "Limit response to comments published before a given ISO8601 compliant date.", 2872 "type": "string" 2873 }, 2874 "exclude": { 2875 "required": false, 2876 "default": [], 2877 "description": "Ensure result set excludes specific IDs.", 2878 "type": "array", 2879 "items": { 2880 "type": "integer" 2881 } 2882 }, 2883 "include": { 2884 "required": false, 2885 "default": [], 2886 "description": "Limit result set to specific IDs.", 2887 "type": "array", 2888 "items": { 2889 "type": "integer" 2890 } 2891 }, 2892 "offset": { 2893 "required": false, 2894 "description": "Offset the result set by a specific number of items.", 2895 "type": "integer" 2896 }, 2897 "order": { 2898 "required": false, 2899 "default": "desc", 2900 "enum": [ 2901 "asc", 2902 "desc" 2903 ], 2904 "description": "Order sort attribute ascending or descending.", 2905 "type": "string" 2906 }, 2907 "orderby": { 2908 "required": false, 2909 "default": "date_gmt", 2910 "enum": [ 2911 "date", 2912 "date_gmt", 2913 "id", 2914 "include", 2915 "post", 2916 "parent", 2917 "type" 2918 ], 2919 "description": "Sort collection by object attribute.", 2920 "type": "string" 2921 }, 2922 "parent": { 2923 "required": false, 2924 "default": [], 2925 "description": "Limit result set to comments of specific parent IDs.", 2926 "type": "array", 2927 "items": { 2928 "type": "integer" 2929 } 2930 }, 2931 "parent_exclude": { 2932 "required": false, 2933 "default": [], 2934 "description": "Ensure result set excludes specific parent IDs.", 2935 "type": "array", 2936 "items": { 2937 "type": "integer" 2938 } 2939 }, 2940 "post": { 2941 "required": false, 2942 "default": [], 2943 "description": "Limit result set to comments assigned to specific post IDs.", 2944 "type": "array", 2945 "items": { 2946 "type": "integer" 2947 } 2948 }, 2949 "status": { 2950 "required": false, 2951 "default": "approve", 2952 "description": "Limit result set to comments assigned a specific status. Requires authorization.", 2953 "type": "string" 2954 }, 2955 "type": { 2956 "required": false, 2957 "default": "comment", 2958 "description": "Limit result set to comments assigned a specific type. Requires authorization.", 2959 "type": "string" 2960 }, 2961 "password": { 2962 "required": false, 2963 "description": "The password for the post if it is password protected.", 2964 "type": "string" 2965 } 2966 } 2967 }, 2968 { 2969 "methods": [ 2970 "POST" 2971 ], 2972 "args": { 2973 "author": { 2974 "required": false, 2975 "description": "The ID of the user object, if author was a user.", 2976 "type": "integer" 2977 }, 2978 "author_email": { 2979 "required": false, 2980 "description": "Email address for the object author.", 2981 "type": "string" 2982 }, 2983 "author_ip": { 2984 "required": false, 2985 "description": "IP address for the object author.", 2986 "type": "string" 2987 }, 2988 "author_name": { 2989 "required": false, 2990 "description": "Display name for the object author.", 2991 "type": "string" 2992 }, 2993 "author_url": { 2994 "required": false, 2995 "description": "URL for the object author.", 2996 "type": "string" 2997 }, 2998 "author_user_agent": { 2999 "required": false, 3000 "description": "User agent for the object author.", 3001 "type": "string" 3002 }, 3003 "content": { 3004 "required": false, 3005 "description": "The content for the object.", 3006 "type": "object" 3007 }, 3008 "date": { 3009 "required": false, 3010 "description": "The date the object was published, in the site's timezone.", 3011 "type": "string" 3012 }, 3013 "date_gmt": { 3014 "required": false, 3015 "description": "The date the object was published, as GMT.", 3016 "type": "string" 3017 }, 3018 "parent": { 3019 "required": false, 3020 "default": 0, 3021 "description": "The ID for the parent of the object.", 3022 "type": "integer" 3023 }, 3024 "post": { 3025 "required": false, 3026 "default": 0, 3027 "description": "The ID of the associated post object.", 3028 "type": "integer" 3029 }, 3030 "status": { 3031 "required": false, 3032 "description": "State of the object.", 3033 "type": "string" 3034 }, 3035 "meta": { 3036 "required": false, 3037 "description": "Meta fields.", 3038 "type": "object" 3039 } 3040 } 3041 } 3042 ], 3043 "_links": { 3044 "self": "http://example.org/?rest_route=/wp/v2/comments" 3045 } 3046 }, 3047 "/wp/v2/comments/(?P<id>[\\d]+)": { 3048 "namespace": "wp/v2", 3049 "methods": [ 3050 "GET", 3051 "POST", 3052 "PUT", 3053 "PATCH", 3054 "DELETE" 3055 ], 3056 "endpoints": [ 3057 { 3058 "methods": [ 3059 "GET" 3060 ], 3061 "args": { 3062 "id": { 3063 "required": false, 3064 "description": "Unique identifier for the object.", 3065 "type": "integer" 3066 }, 3067 "context": { 3068 "required": false, 3069 "default": "view", 3070 "enum": [ 3071 "view", 3072 "embed", 3073 "edit" 3074 ], 3075 "description": "Scope under which the request is made; determines fields present in response.", 3076 "type": "string" 3077 }, 3078 "password": { 3079 "required": false, 3080 "description": "The password for the post if it is password protected.", 3081 "type": "string" 3082 } 3083 } 3084 }, 3085 { 3086 "methods": [ 3087 "POST", 3088 "PUT", 3089 "PATCH" 3090 ], 3091 "args": { 3092 "id": { 3093 "required": false, 3094 "description": "Unique identifier for the object.", 3095 "type": "integer" 3096 }, 3097 "author": { 3098 "required": false, 3099 "description": "The ID of the user object, if author was a user.", 3100 "type": "integer" 3101 }, 3102 "author_email": { 3103 "required": false, 3104 "description": "Email address for the object author.", 3105 "type": "string" 3106 }, 3107 "author_ip": { 3108 "required": false, 3109 "description": "IP address for the object author.", 3110 "type": "string" 3111 }, 3112 "author_name": { 3113 "required": false, 3114 "description": "Display name for the object author.", 3115 "type": "string" 3116 }, 3117 "author_url": { 3118 "required": false, 3119 "description": "URL for the object author.", 3120 "type": "string" 3121 }, 3122 "author_user_agent": { 3123 "required": false, 3124 "description": "User agent for the object author.", 3125 "type": "string" 3126 }, 3127 "content": { 3128 "required": false, 3129 "description": "The content for the object.", 3130 "type": "object" 3131 }, 3132 "date": { 3133 "required": false, 3134 "description": "The date the object was published, in the site's timezone.", 3135 "type": "string" 3136 }, 3137 "date_gmt": { 3138 "required": false, 3139 "description": "The date the object was published, as GMT.", 3140 "type": "string" 3141 }, 3142 "parent": { 3143 "required": false, 3144 "description": "The ID for the parent of the object.", 3145 "type": "integer" 3146 }, 3147 "post": { 3148 "required": false, 3149 "description": "The ID of the associated post object.", 3150 "type": "integer" 3151 }, 3152 "status": { 3153 "required": false, 3154 "description": "State of the object.", 3155 "type": "string" 3156 }, 3157 "meta": { 3158 "required": false, 3159 "description": "Meta fields.", 3160 "type": "object" 3161 } 3162 } 3163 }, 3164 { 3165 "methods": [ 3166 "DELETE" 3167 ], 3168 "args": { 3169 "id": { 3170 "required": false, 3171 "description": "Unique identifier for the object.", 3172 "type": "integer" 3173 }, 3174 "force": { 3175 "required": false, 3176 "default": false, 3177 "description": "Whether to bypass trash and force deletion.", 3178 "type": "boolean" 3179 }, 3180 "password": { 3181 "required": false, 3182 "description": "The password for the post if it is password protected.", 3183 "type": "string" 3184 } 3185 } 3186 } 3187 ] 3188 }, 3189 "/wp/v2/settings": { 3190 "namespace": "wp/v2", 3191 "methods": [ 3192 "GET", 3193 "POST", 3194 "PUT", 3195 "PATCH" 3196 ], 3197 "endpoints": [ 3198 { 3199 "methods": [ 3200 "GET" 3201 ], 3202 "args": [] 3203 }, 3204 { 3205 "methods": [ 3206 "POST", 3207 "PUT", 3208 "PATCH" 3209 ], 3210 "args": { 3211 "title": { 3212 "required": false, 3213 "description": "Site title.", 3214 "type": "string" 3215 }, 3216 "description": { 3217 "required": false, 3218 "description": "Site tagline.", 3219 "type": "string" 3220 }, 3221 "url": { 3222 "required": false, 3223 "description": "Site URL.", 3224 "type": "string" 3225 }, 3226 "email": { 3227 "required": false, 3228 "description": "This address is used for admin purposes, like new user notification.", 3229 "type": "string" 3230 }, 3231 "timezone": { 3232 "required": false, 3233 "description": "A city in the same timezone as you.", 3234 "type": "string" 3235 }, 3236 "date_format": { 3237 "required": false, 3238 "description": "A date format for all date strings.", 3239 "type": "string" 3240 }, 3241 "time_format": { 3242 "required": false, 3243 "description": "A time format for all time strings.", 3244 "type": "string" 3245 }, 3246 "start_of_week": { 3247 "required": false, 3248 "description": "A day number of the week that the week should start on.", 3249 "type": "integer" 3250 }, 3251 "language": { 3252 "required": false, 3253 "description": "WordPress locale code.", 3254 "type": "string" 3255 }, 3256 "use_smilies": { 3257 "required": false, 3258 "description": "Convert emoticons like :-) and :-P to graphics on display.", 3259 "type": "boolean" 3260 }, 3261 "default_category": { 3262 "required": false, 3263 "description": "Default post category.", 3264 "type": "integer" 3265 }, 3266 "default_post_format": { 3267 "required": false, 3268 "description": "Default post format.", 3269 "type": "string" 3270 }, 3271 "posts_per_page": { 3272 "required": false, 3273 "description": "Blog pages show at most.", 3274 "type": "integer" 3275 }, 3276 "default_ping_status": { 3277 "required": false, 3278 "enum": [ 3279 "open", 3280 "closed" 3281 ], 3282 "description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.", 3283 "type": "string" 3284 }, 3285 "default_comment_status": { 3286 "required": false, 3287 "enum": [ 3288 "open", 3289 "closed" 3290 ], 3291 "description": "Allow people to post comments on new articles.", 3292 "type": "string" 3293 } 3294 } 3295 } 3296 ], 3297 "_links": { 3298 "self": "http://example.org/?rest_route=/wp/v2/settings" 3299 } 3300 } 3301 } 3302 }; 12 3303 13 mockedApiResponse.oembeds = {"code":"rest_missing_callback_param","message":"Missing parameter(s): url","data":{"status":400,"params":["url"]}}; 3304 mockedApiResponse.oembed = { 3305 "namespace": "oembed/1.0", 3306 "routes": { 3307 "/oembed/1.0": { 3308 "namespace": "oembed/1.0", 3309 "methods": [ 3310 "GET" 3311 ], 3312 "endpoints": [ 3313 { 3314 "methods": [ 3315 "GET" 3316 ], 3317 "args": { 3318 "namespace": { 3319 "required": false, 3320 "default": "oembed/1.0" 3321 }, 3322 "context": { 3323 "required": false, 3324 "default": "view" 3325 } 3326 } 3327 } 3328 ], 3329 "_links": { 3330 "self": "http://example.org/?rest_route=/oembed/1.0" 3331 } 3332 }, 3333 "/oembed/1.0/embed": { 3334 "namespace": "oembed/1.0", 3335 "methods": [ 3336 "GET" 3337 ], 3338 "endpoints": [ 3339 { 3340 "methods": [ 3341 "GET" 3342 ], 3343 "args": { 3344 "url": { 3345 "required": true 3346 }, 3347 "format": { 3348 "required": false, 3349 "default": "json" 3350 }, 3351 "maxwidth": { 3352 "required": false, 3353 "default": 600 3354 } 3355 } 3356 } 3357 ], 3358 "_links": { 3359 "self": "http://example.org/?rest_route=/oembed/1.0/embed" 3360 } 3361 } 3362 } 3363 }; 14 3364 15 mockedApiResponse.PostsCollection = [{"id":1368,"date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","guid":{"rendered":"http:\/\/example.org\/?p=1368"},"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","slug":"post-title-6208","type":"post","link":"http:\/\/example.org\/?p=1368","title":{"rendered":"Post title 6208"},"content":{"rendered":"<p>Updated content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post excerpt 6208<\/p>\n","protected":false},"author":354,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"test_single":"","test_multi":[],"test_bad_auth":"","test_bad_auth_multi":[],"test_custom_schema":0,"test_custom_schema_multi":[],"new_name":"","new_name_multi":[],"test_string":"","test_number":0,"test_bool":false,"my_meta_key":[]},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts\/1368"}],"collection":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/users\/354"}],"replies":[{"embeddable":true,"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fcomments&post=1368"}],"version-history":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts\/1368\/revisions"}],"wp:attachment":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fcategories&post=1368"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Ftags&post=1368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}]; 3365 mockedApiResponse.oembeds = { 3366 "code": "rest_missing_callback_param", 3367 "message": "Missing parameter(s): url", 3368 "data": { 3369 "status": 400, 3370 "params": [ 3371 "url" 3372 ] 3373 } 3374 }; 16 3375 17 mockedApiResponse.PostModel = {"id":1368,"date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","guid":{"rendered":"http:\/\/example.org\/?p=1368"},"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","slug":"post-title-6208","type":"post","link":"http:\/\/example.org\/?p=1368","title":{"rendered":"Post title 6208"},"content":{"rendered":"<p>Updated content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post excerpt 6208<\/p>\n","protected":false},"author":354,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"test_single":"","test_multi":[],"test_bad_auth":"","test_bad_auth_multi":[],"test_custom_schema":0,"test_custom_schema_multi":[],"new_name":"","new_name_multi":[],"test_string":"","test_number":0,"test_bool":false,"my_meta_key":[]},"categories":[1],"tags":[]}; 3376 mockedApiResponse.PostsCollection = [ 3377 { 3378 "id": 3, 3379 "date": "2017-02-14T00:00:00", 3380 "date_gmt": "2017-02-14T00:00:00", 3381 "guid": { 3382 "rendered": "http://example.org/?p=3" 3383 }, 3384 "modified": "2017-02-14T00:00:00", 3385 "modified_gmt": "2017-02-14T00:00:00", 3386 "slug": "restapi-client-fixture-post", 3387 "status": "publish", 3388 "type": "post", 3389 "link": "http://example.org/?p=3", 3390 "title": { 3391 "rendered": "REST API Client Fixture: Post" 3392 }, 3393 "content": { 3394 "rendered": "<p>Updated post content.</p>\n", 3395 "protected": false 3396 }, 3397 "excerpt": { 3398 "rendered": "<p>REST API Client Fixture: Post</p>\n", 3399 "protected": false 3400 }, 3401 "author": 0, 3402 "featured_media": 0, 3403 "comment_status": "open", 3404 "ping_status": "open", 3405 "sticky": false, 3406 "template": "", 3407 "format": "standard", 3408 "meta": [], 3409 "categories": [ 3410 1 3411 ], 3412 "tags": [], 3413 "_links": { 3414 "self": [ 3415 { 3416 "href": "http://example.org/?rest_route=/wp/v2/posts/3" 3417 } 3418 ], 3419 "collection": [ 3420 { 3421 "href": "http://example.org/?rest_route=/wp/v2/posts" 3422 } 3423 ], 3424 "about": [ 3425 { 3426 "href": "http://example.org/?rest_route=/wp/v2/types/post" 3427 } 3428 ], 3429 "replies": [ 3430 { 3431 "embeddable": true, 3432 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=3" 3433 } 3434 ], 3435 "version-history": [ 3436 { 3437 "href": "http://example.org/?rest_route=/wp/v2/posts/3/revisions" 3438 } 3439 ], 3440 "wp:attachment": [ 3441 { 3442 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3" 3443 } 3444 ], 3445 "wp:term": [ 3446 { 3447 "taxonomy": "category", 3448 "embeddable": true, 3449 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcategories&post=3" 3450 }, 3451 { 3452 "taxonomy": "post_tag", 3453 "embeddable": true, 3454 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Ftags&post=3" 3455 } 3456 ], 3457 "curies": [ 3458 { 3459 "name": "wp", 3460 "href": "https://api.w.org/{rel}", 3461 "templated": true 3462 } 3463 ] 3464 } 3465 } 3466 ]; 18 3467 19 mockedApiResponse.postRevisions = [{"author":"354","date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","id":1371,"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","parent":1368,"slug":"1368-revision-v1","guid":{"rendered":"http:\/\/example.org\/?p=1371"},"title":{"rendered":"Post title 6208"},"content":{"rendered":"<p>Updated content.<\/p>\n"},"excerpt":{"rendered":"<p>Post excerpt 6208<\/p>\n"},"_links":{"parent":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts\/1368"}]}}]; 3468 mockedApiResponse.PostModel = { 3469 "id": 3, 3470 "date": "2017-02-14T00:00:00", 3471 "date_gmt": "2017-02-14T00:00:00", 3472 "guid": { 3473 "rendered": "http://example.org/?p=3" 3474 }, 3475 "modified": "2017-02-14T00:00:00", 3476 "modified_gmt": "2017-02-14T00:00:00", 3477 "slug": "restapi-client-fixture-post", 3478 "status": "publish", 3479 "type": "post", 3480 "link": "http://example.org/?p=3", 3481 "title": { 3482 "rendered": "REST API Client Fixture: Post" 3483 }, 3484 "content": { 3485 "rendered": "<p>Updated post content.</p>\n", 3486 "protected": false 3487 }, 3488 "excerpt": { 3489 "rendered": "<p>REST API Client Fixture: Post</p>\n", 3490 "protected": false 3491 }, 3492 "author": 0, 3493 "featured_media": 0, 3494 "comment_status": "open", 3495 "ping_status": "open", 3496 "sticky": false, 3497 "template": "", 3498 "format": "standard", 3499 "meta": [], 3500 "categories": [ 3501 1 3502 ], 3503 "tags": [] 3504 }; 20 3505 21 mockedApiResponse.revision = {"code":"rest_post_invalid_id","message":"Invalid revision ID.","data":{"status":404}}; 3506 mockedApiResponse.postRevisions = [ 3507 { 3508 "author": "2", 3509 "date": "2017-02-14T00:00:00", 3510 "date_gmt": "2017-02-14T00:00:00", 3511 "id": 4, 3512 "modified": "2017-02-14T00:00:00", 3513 "modified_gmt": "2017-02-14T00:00:00", 3514 "parent": 3, 3515 "slug": "3-revision-v1", 3516 "guid": { 3517 "rendered": "http://example.org/?p=4" 3518 }, 3519 "title": { 3520 "rendered": "REST API Client Fixture: Post" 3521 }, 3522 "content": { 3523 "rendered": "<p>Updated post content.</p>\n" 3524 }, 3525 "excerpt": { 3526 "rendered": "<p>REST API Client Fixture: Post</p>\n" 3527 }, 3528 "_links": { 3529 "parent": [ 3530 { 3531 "href": "http://example.org/?rest_route=/wp/v2/posts/3" 3532 } 3533 ] 3534 } 3535 } 3536 ]; 22 3537 23 mockedApiResponse.PagesCollection = [{"id":1369,"date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","guid":{"rendered":"http:\/\/example.org\/?page_id=1369"},"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","slug":"post-title-6209","type":"page","link":"http:\/\/example.org\/?page_id=1369","title":{"rendered":"Post title 6209"},"content":{"rendered":"<p>Updated content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post excerpt 6209<\/p>\n","protected":false},"author":354,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"test_single":"","test_multi":[],"test_bad_auth":"","test_bad_auth_multi":[],"test_custom_schema":0,"test_custom_schema_multi":[],"new_name":"","new_name_multi":[],"test_string":"","test_number":0,"test_bool":false,"my_meta_key":[]},"_links":{"self":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/pages\/1369"}],"collection":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/users\/354"}],"replies":[{"embeddable":true,"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fcomments&post=1369"}],"version-history":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/pages\/1369\/revisions"}],"wp:attachment":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}]; 3538 mockedApiResponse.revision = { 3539 "code": "rest_post_invalid_id", 3540 "message": "Invalid revision ID.", 3541 "data": { 3542 "status": 404 3543 } 3544 }; 24 3545 25 mockedApiResponse.PageModel = {"id":1369,"date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","guid":{"rendered":"http:\/\/example.org\/?page_id=1369"},"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","slug":"post-title-6209","type":"page","link":"http:\/\/example.org\/?page_id=1369","title":{"rendered":"Post title 6209"},"content":{"rendered":"<p>Updated content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post excerpt 6209<\/p>\n","protected":false},"author":354,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"test_single":"","test_multi":[],"test_bad_auth":"","test_bad_auth_multi":[],"test_custom_schema":0,"test_custom_schema_multi":[],"new_name":"","new_name_multi":[],"test_string":"","test_number":0,"test_bool":false,"my_meta_key":[]}}; 3546 mockedApiResponse.PagesCollection = [ 3547 { 3548 "id": 5, 3549 "date": "2017-02-14T00:00:00", 3550 "date_gmt": "2017-02-14T00:00:00", 3551 "guid": { 3552 "rendered": "http://example.org/?page_id=5" 3553 }, 3554 "modified": "2017-02-14T00:00:00", 3555 "modified_gmt": "2017-02-14T00:00:00", 3556 "slug": "restapi-client-fixture-page", 3557 "status": "publish", 3558 "type": "page", 3559 "link": "http://example.org/?page_id=5", 3560 "title": { 3561 "rendered": "REST API Client Fixture: Page" 3562 }, 3563 "content": { 3564 "rendered": "<p>Updated page content.</p>\n", 3565 "protected": false 3566 }, 3567 "excerpt": { 3568 "rendered": "<p>REST API Client Fixture: Page</p>\n", 3569 "protected": false 3570 }, 3571 "author": 0, 3572 "featured_media": 0, 3573 "parent": 0, 3574 "menu_order": 0, 3575 "comment_status": "closed", 3576 "ping_status": "closed", 3577 "template": "", 3578 "meta": [], 3579 "_links": { 3580 "self": [ 3581 { 3582 "href": "http://example.org/?rest_route=/wp/v2/pages/5" 3583 } 3584 ], 3585 "collection": [ 3586 { 3587 "href": "http://example.org/?rest_route=/wp/v2/pages" 3588 } 3589 ], 3590 "about": [ 3591 { 3592 "href": "http://example.org/?rest_route=/wp/v2/types/page" 3593 } 3594 ], 3595 "replies": [ 3596 { 3597 "embeddable": true, 3598 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=5" 3599 } 3600 ], 3601 "version-history": [ 3602 { 3603 "href": "http://example.org/?rest_route=/wp/v2/pages/5/revisions" 3604 } 3605 ], 3606 "wp:attachment": [ 3607 { 3608 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5" 3609 } 3610 ], 3611 "curies": [ 3612 { 3613 "name": "wp", 3614 "href": "https://api.w.org/{rel}", 3615 "templated": true 3616 } 3617 ] 3618 } 3619 } 3620 ]; 26 3621 27 mockedApiResponse.pageRevisions = [{"author":"354","date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","id":1372,"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","parent":1369,"slug":"1369-revision-v1","guid":{"rendered":"http:\/\/example.org\/?p=1372"},"title":{"rendered":"Post title 6209"},"content":{"rendered":"<p>Updated content.<\/p>\n"},"excerpt":{"rendered":"<p>Post excerpt 6209<\/p>\n"},"_links":{"parent":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/pages\/1369"}]}}]; 3622 mockedApiResponse.PageModel = { 3623 "id": 5, 3624 "date": "2017-02-14T00:00:00", 3625 "date_gmt": "2017-02-14T00:00:00", 3626 "guid": { 3627 "rendered": "http://example.org/?page_id=5" 3628 }, 3629 "modified": "2017-02-14T00:00:00", 3630 "modified_gmt": "2017-02-14T00:00:00", 3631 "slug": "restapi-client-fixture-page", 3632 "status": "publish", 3633 "type": "page", 3634 "link": "http://example.org/?page_id=5", 3635 "title": { 3636 "rendered": "REST API Client Fixture: Page" 3637 }, 3638 "content": { 3639 "rendered": "<p>Updated page content.</p>\n", 3640 "protected": false 3641 }, 3642 "excerpt": { 3643 "rendered": "<p>REST API Client Fixture: Page</p>\n", 3644 "protected": false 3645 }, 3646 "author": 0, 3647 "featured_media": 0, 3648 "parent": 0, 3649 "menu_order": 0, 3650 "comment_status": "closed", 3651 "ping_status": "closed", 3652 "template": "", 3653 "meta": [] 3654 }; 28 3655 29 mockedApiResponse.pageRevision = {"code":"rest_post_invalid_id","message":"Invalid revision ID.","data":{"status":404}}; 3656 mockedApiResponse.pageRevisions = [ 3657 { 3658 "author": "2", 3659 "date": "2017-02-14T00:00:00", 3660 "date_gmt": "2017-02-14T00:00:00", 3661 "id": 6, 3662 "modified": "2017-02-14T00:00:00", 3663 "modified_gmt": "2017-02-14T00:00:00", 3664 "parent": 5, 3665 "slug": "5-revision-v1", 3666 "guid": { 3667 "rendered": "http://example.org/?p=6" 3668 }, 3669 "title": { 3670 "rendered": "REST API Client Fixture: Page" 3671 }, 3672 "content": { 3673 "rendered": "<p>Updated page content.</p>\n" 3674 }, 3675 "excerpt": { 3676 "rendered": "<p>REST API Client Fixture: Page</p>\n" 3677 }, 3678 "_links": { 3679 "parent": [ 3680 { 3681 "href": "http://example.org/?rest_route=/wp/v2/pages/5" 3682 } 3683 ] 3684 } 3685 } 3686 ]; 30 3687 31 mockedApiResponse.MediaCollection = [{"id":1370,"date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","guid":{"rendered":"http:\/\/example.org\/?attachment_id=1370"},"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","slug":"1370","type":"attachment","link":"http:\/\/example.org\/?attachment_id=1370","title":{"rendered":""},"author":354,"comment_status":"open","ping_status":"closed","template":"","meta":{"test_single":"","test_multi":[],"test_bad_auth":"","test_bad_auth_multi":[],"test_custom_schema":0,"test_custom_schema_multi":[],"new_name":"","new_name_multi":[],"test_string":"","test_number":0,"test_bool":false,"my_meta_key":[]},"description":{"rendered":"<p class=\"attachment\"><a href='http:\/\/example.org\/wp-content\/uploads\/\/tmp\/canola.jpg'><img width=\"1\" height=\"1\" src=\"http:\/\/example.org\/wp-content\/uploads\/\/tmp\/canola.jpg\" class=\"attachment-medium size-medium\" alt=\"\" \/><\/a><\/p>\n"},"caption":{"rendered":"<p>A sample caption<\/p>\n"},"alt_text":"","media_type":"image","mime_type":"image\/jpeg","media_details":{},"post":null,"source_url":"http:\/\/example.org\/wp-content\/uploads\/\/tmp\/canola.jpg","_links":{"self":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/media\/1370"}],"collection":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/media"}],"about":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types\/attachment"}],"author":[{"embeddable":true,"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/users\/354"}],"replies":[{"embeddable":true,"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fcomments&post=1370"}]}}]; 3688 mockedApiResponse.pageRevision = { 3689 "code": "rest_post_invalid_id", 3690 "message": "Invalid revision ID.", 3691 "data": { 3692 "status": 404 3693 } 3694 }; 32 3695 33 mockedApiResponse.MediaModel = {"id":1370,"date":"2017-02-14T04:05:35","date_gmt":"2017-02-14T04:05:35","guid":{"rendered":"http:\/\/example.org\/?attachment_id=1370"},"modified":"2017-02-14T04:05:35","modified_gmt":"2017-02-14T04:05:35","slug":"1370","type":"attachment","link":"http:\/\/example.org\/?attachment_id=1370","title":{"rendered":""},"author":354,"comment_status":"open","ping_status":"closed","template":"","meta":{"test_single":"","test_multi":[],"test_bad_auth":"","test_bad_auth_multi":[],"test_custom_schema":0,"test_custom_schema_multi":[],"new_name":"","new_name_multi":[],"test_string":"","test_number":0,"test_bool":false,"my_meta_key":[]},"description":{"rendered":"<p class=\"attachment\"><a href='http:\/\/example.org\/wp-content\/uploads\/\/tmp\/canola.jpg'><img width=\"1\" height=\"1\" src=\"http:\/\/example.org\/wp-content\/uploads\/\/tmp\/canola.jpg\" class=\"attachment-medium size-medium\" alt=\"\" \/><\/a><\/p>\n"},"caption":{"rendered":"<p>A sample caption<\/p>\n"},"alt_text":"","media_type":"image","mime_type":"image\/jpeg","media_details":{},"post":null,"source_url":"http:\/\/example.org\/wp-content\/uploads\/\/tmp\/canola.jpg"}; 3696 mockedApiResponse.MediaCollection = [ 3697 { 3698 "id": 7, 3699 "date": "2017-02-14T00:00:00", 3700 "date_gmt": "2017-02-14T00:00:00", 3701 "guid": { 3702 "rendered": "http://example.org/?attachment_id=7" 3703 }, 3704 "modified": "2017-02-14T00:00:00", 3705 "modified_gmt": "2017-02-14T00:00:00", 3706 "slug": "restapi-client-fixture-attachment", 3707 "status": "inherit", 3708 "type": "attachment", 3709 "link": "http://example.org/?attachment_id=7", 3710 "title": { 3711 "rendered": "REST API Client Fixture: Attachment" 3712 }, 3713 "author": 0, 3714 "comment_status": "open", 3715 "ping_status": "closed", 3716 "template": "", 3717 "meta": [], 3718 "description": { 3719 "rendered": "<p class=\"attachment\"><a href='http://example.org/wp-content/uploads//tmp/canola.jpg'><img width=\"1\" height=\"1\" src=\"http://example.org/wp-content/uploads//tmp/canola.jpg\" class=\"attachment-medium size-medium\" alt=\"\" /></a></p>\n" 3720 }, 3721 "caption": { 3722 "rendered": "<p>A sample caption</p>\n" 3723 }, 3724 "alt_text": "", 3725 "media_type": "image", 3726 "mime_type": "image/jpeg", 3727 "media_details": {}, 3728 "post": null, 3729 "source_url": "http://example.org/wp-content/uploads//tmp/canola.jpg", 3730 "_links": { 3731 "self": [ 3732 { 3733 "href": "http://example.org/?rest_route=/wp/v2/media/7" 3734 } 3735 ], 3736 "collection": [ 3737 { 3738 "href": "http://example.org/?rest_route=/wp/v2/media" 3739 } 3740 ], 3741 "about": [ 3742 { 3743 "href": "http://example.org/?rest_route=/wp/v2/types/attachment" 3744 } 3745 ], 3746 "replies": [ 3747 { 3748 "embeddable": true, 3749 "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=7" 3750 } 3751 ] 3752 } 3753 } 3754 ]; 34 3755 35 mockedApiResponse.TypesCollection = {"post":{"description":"","hierarchical":false,"name":"Posts","slug":"post","taxonomies":["category","post_tag"],"rest_base":"posts","_links":{"collection":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types"}],"wp:items":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},"page":{"description":"","hierarchical":true,"name":"Pages","slug":"page","taxonomies":[],"rest_base":"pages","_links":{"collection":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types"}],"wp:items":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/pages"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},"attachment":{"description":"","hierarchical":false,"name":"Media","slug":"attachment","taxonomies":[],"rest_base":"media","_links":{"collection":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/types"}],"wp:items":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/media"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}}; 3756 mockedApiResponse.MediaModel = { 3757 "id": 7, 3758 "date": "2017-02-14T00:00:00", 3759 "date_gmt": "2017-02-14T00:00:00", 3760 "guid": { 3761 "rendered": "http://example.org/?attachment_id=7" 3762 }, 3763 "modified": "2017-02-14T00:00:00", 3764 "modified_gmt": "2017-02-14T00:00:00", 3765 "slug": "restapi-client-fixture-attachment", 3766 "status": "inherit", 3767 "type": "attachment", 3768 "link": "http://example.org/?attachment_id=7", 3769 "title": { 3770 "rendered": "REST API Client Fixture: Attachment" 3771 }, 3772 "author": 0, 3773 "comment_status": "open", 3774 "ping_status": "closed", 3775 "template": "", 3776 "meta": [], 3777 "description": { 3778 "rendered": "<p class=\"attachment\"><a href='http://example.org/wp-content/uploads//tmp/canola.jpg'><img width=\"1\" height=\"1\" src=\"http://example.org/wp-content/uploads//tmp/canola.jpg\" class=\"attachment-medium size-medium\" alt=\"\" /></a></p>\n" 3779 }, 3780 "caption": { 3781 "rendered": "<p>A sample caption</p>\n" 3782 }, 3783 "alt_text": "", 3784 "media_type": "image", 3785 "mime_type": "image/jpeg", 3786 "media_details": {}, 3787 "post": null, 3788 "source_url": "http://example.org/wp-content/uploads//tmp/canola.jpg" 3789 }; 36 3790 37 mockedApiResponse.TypeModel = {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}; 3791 mockedApiResponse.TypesCollection = { 3792 "post": { 3793 "description": "", 3794 "hierarchical": false, 3795 "name": "Posts", 3796 "slug": "post", 3797 "taxonomies": [ 3798 "category", 3799 "post_tag" 3800 ], 3801 "rest_base": "posts", 3802 "_links": { 3803 "collection": [ 3804 { 3805 "href": "http://example.org/?rest_route=/wp/v2/types" 3806 } 3807 ], 3808 "wp:items": [ 3809 { 3810 "href": "http://example.org/?rest_route=/wp/v2/posts" 3811 } 3812 ], 3813 "curies": [ 3814 { 3815 "name": "wp", 3816 "href": "https://api.w.org/{rel}", 3817 "templated": true 3818 } 3819 ] 3820 } 3821 }, 3822 "page": { 3823 "description": "", 3824 "hierarchical": true, 3825 "name": "Pages", 3826 "slug": "page", 3827 "taxonomies": [], 3828 "rest_base": "pages", 3829 "_links": { 3830 "collection": [ 3831 { 3832 "href": "http://example.org/?rest_route=/wp/v2/types" 3833 } 3834 ], 3835 "wp:items": [ 3836 { 3837 "href": "http://example.org/?rest_route=/wp/v2/pages" 3838 } 3839 ], 3840 "curies": [ 3841 { 3842 "name": "wp", 3843 "href": "https://api.w.org/{rel}", 3844 "templated": true 3845 } 3846 ] 3847 } 3848 }, 3849 "attachment": { 3850 "description": "", 3851 "hierarchical": false, 3852 "name": "Media", 3853 "slug": "attachment", 3854 "taxonomies": [], 3855 "rest_base": "media", 3856 "_links": { 3857 "collection": [ 3858 { 3859 "href": "http://example.org/?rest_route=/wp/v2/types" 3860 } 3861 ], 3862 "wp:items": [ 3863 { 3864 "href": "http://example.org/?rest_route=/wp/v2/media" 3865 } 3866 ], 3867 "curies": [ 3868 { 3869 "name": "wp", 3870 "href": "https://api.w.org/{rel}", 3871 "templated": true 3872 } 3873 ] 3874 } 3875 } 3876 }; 38 3877 39 mockedApiResponse.StatusesCollection = {"publish":{"name":"Published","public":true,"queryable":true,"slug":"publish","_links":{"archives":[{"href":"http:\/\/example.org\/?rest_route=\/wp\/v2\/posts"}]}},"future":{"name":"Scheduled","public":false,"queryable":false,"slug":"future","_links":{"archives":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fposts&status=future"}]}},"draft":{"name":"Draft","public":false,"queryable":false,"slug":"draft","_links":{"archives":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fposts&status=draft"}]}},"pending":{"name":"Pending","public":false,"queryable":false,"slug":"pending","_links":{"archives":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fposts&status=pending"}]}},"private":{"name":"Private","public":false,"queryable":false,"slug":"private","_links":{"archives":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fposts&status=private"}]}},"trash":{"name":"Trash","public":false,"queryable":false,"slug":"trash","_links":{"archives":[{"href":"http:\/\/example.org\/?rest_route=%2Fwp%2Fv2%2Fposts&status=trash"}]}}}; 3878 mockedApiResponse.TypeModel = { 3879 "code": "rest_no_route", 3880 "message": "No route was found matching the URL and request method", 3881 "data": { 3882 "status": 404 3883 } 3884 }; 40 3885 41 mockedApiResponse.StatusModel = {"name":"Published","public":true,"queryable":true,"slug":"publish"}; 3886 mockedApiResponse.StatusesCollection = { 3887 "publish": { 3888 "name": "Published", 3889 "public": true, 3890 "queryable": true, 3891 "slug": "publish", 3892 "_links": { 3893 "archives": [ 3894 { 3895 "href": "http://example.org/?rest_route=/wp/v2/posts" 3896 } 3897 ] 3898 } 3899 }, 3900 "future": { 3901 "name": "Scheduled", 3902 "public": false, 3903 "queryable": false, 3904 "slug": "future", 3905 "_links": {