GitHub PullRequestReviewCommentEvent at 2014-12-09 20:58:15
Repository: WP-API
Actor: rachelbaker
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/21561637","id":21561637,"diff_hunk":"@@ -0,0 +1,599 @@\n+<?php\n+\n+/**\n+ * Access posts\n+ */\n+class WP_JSON_Posts_Controller extends WP_JSON_Controller {\n+\n+\t/**\n+\t * Get all posts\n+\t *\n+\t * @param WP_JSON_Request $request Full details about the request\n+\t * @return WP_Error|WP_HTTP_ResponseInterface\n+\t */\n+\tpublic function get_items( $request ) {\n+\t\t$request_params = $request->get_query_params();\n+\n+\t\t$prepared_args = (array) $request_params;\n+\t\t$prepared_args['post_type'] = array();\n+\t\t$prepared_args['paged'] = isset( $request_params['page'] ) ? absint( $request_params['page'] ) : 1;\n+\t\tunset( $prepared_args['page'] );\n+\t\t$prepared_args = apply_filters( 'json_post_query', $prepared_args, $request );\n+\n+\t\tif ( ! empty( $request_params['post_type'] ) ) {\n+\t\t\tforeach ( (array) $request_params['post_type'] as $type ) {\n+\t\t\t\tif ( ! $this->check_is_post_type_allowed( $type ) ) {\n+\t\t\t\t\treturn new WP_Error( 'json_invalid_post_type', sprintf( __( 'The post type \"%s\" is not valid' ), $type ), array( 'status' => 403 ) );\n+\t\t\t\t}\n+\n+\t\t\t\t$prepared_args['post_type'][] = $type;\n+\t\t\t}\n+\t\t}\n+\n+\t\tglobal $wp;\n+\t\t$valid_vars = apply_filters( 'query_vars', $wp->public_query_vars );\n+\n+\t\t/**\n+\t\t* If the user has the correct permissions, also allow use of internal\n+\t\t* query parameters, which are only undesirable on the frontend.\n+\t\t*\n+\t\t* To disable anyway, use `add_filter('json_private_query_vars', '__return_empty_array');`\n+\t\t*/\n+\t\tif ( current_user_can( 'edit_posts' ) ) {\n+\t\t\t$private = apply_filters( 'json_private_query_vars', $wp->private_query_vars );\n+\t\t\t$valid_vars = array_merge( $valid_vars, $private );\n+\t\t}\n+\t\t// Define our own in addition to WP's normal vars\n+\t\t$json_valid = array( 'posts_per_page', 'ignore_sticky_posts' );\n+\t\t$valid_vars = array_merge( $valid_vars, $json_valid );\n+\n+\t\t// Filter and flip for querying\n+\t\t$valid_vars = apply_filters( 'json_query_vars', $valid_vars );\n+\t\t$valid_vars = array_flip( $valid_vars );\n+\n+\t\t$query_args = array();\n+\t\tforeach ( $valid_vars as $var => $index ) {\n+\t\t\tif ( isset( $prepared_args[ $var ] ) ) {\n+\t\t\t\t$query_args[ $var ] = apply_filters( 'json_query_var-' . $var, $prepared_args[ $var ] );\n+\t\t\t}\n+\t\t}\n+\n+\t\t$posts_query = new WP_Query();\n+\t\t$posts = $posts_query->query( $query_args );\n+\t\tif ( is_wp_error( $posts ) ) {\n+\t\t\treturn $posts;\n+\t\t}\n+\n+\t\tforeach ( $posts as &$post ) {\n+\t\t\tif ( ! $this->check_read_permission( $post ) ) {\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\t$post = $this->prepare_item_for_response( $post, $request );\n+\t\t}\n+\n+\t\t$response = json_ensure_response( $posts );\n+\t\t$response->query_navigation_headers( $posts_query );\n+\n+\t\treturn $response;\n+\t}\n+\n+\t/**\n+\t * Get a single post\n+\t *\n+\t * @param WP_JSON_Request $request Full details about the request\n+\t * @return WP_Error|WP_HTTP_ResponseInterface\n+\t */\n+\tpublic function get_item( $request ) {\n+\t\t$id = (int) $request['id'];\n+\t\t$post = get_post( $id );\n+\n+\t\tif ( empty( $id ) || empty( $post->ID ) ) {\n+\t\t\treturn new WP_Error( 'json_post_invalid_id', __( 'Invalid post ID.' ), array( 'status' => 404 ) );\n+\t\t}\n+\n+\t\tif ( 'edit' === $request['context'] && ! $this->check_edit_permission( $post ) ) {\n+\t\t\treturn new WP_Error( 'json_post_cannot_edit', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => 403 ) );\n+\t\t} elseif ( ! $this->check_read_permission( $post ) ) {\n+\t\t\treturn new WP_Error( 'json_user_cannot_read', __( 'Sorry, you cannot read this post.' ), array( 'status' => 401 ) );\n+\t\t}\n+\n+\t\t$post = $this->prepare_item_for_response( $post, $request );\n+\n+\t\t$response = json_ensure_response( $post );\n+\t\t// @ TODO: Add links.\n+\t\t$response->link_header( 'alternate',  get_permalink( $id ), array( 'type' => 'text/html' ) );\n+\n+\t\treturn $response;\n+\t}\n+\n+\t/**\n+\t * Create a single post\n+\t *\n+\t * @param WP_JSON_Request $request Full details about the request\n+\t * @return WP_Error|WP_HTTP_ResponseInterface\n+\t */\n+\tpublic function create_item( $request ) {\n+\t\t$sticky = isset( $request['sticky'] ) ? (bool) $request['sticky'] : false;\n+\n+\t\tif ( ! empty( $request['id'] ) ) {\n+\t\t\treturn new WP_Error( 'json_post_exists', __( 'Cannot create existing post.' ), array( 'status' => 400 ) );\n+\t\t}\n+\n+\t\t$post = $this->prepare_item_for_database( $request );\n+\t\tif ( is_wp_error( $post ) ) {\n+\t\t\treturn $post;\n+\t\t}\n+\n+\t\t$post_id = wp_insert_post( $post );\n+\t\tif ( is_wp_error( $post_id ) ) {\n+\t\t\treturn $post_id;\n+\t\t}\n+\n+\t\t$post->ID = $post_id;\n+\t\t$this->handle_sticky_posts( $sticky );\n+\n+\t\tdo_action( 'json_insert_post', $post, $request );\n+\n+\t\t$response = $this->get_item( array(\n+\t\t\t'id'      => $post_id,\n+\t\t\t'context' => 'edit',\n+\t\t));\n+\t\t$response = json_ensure_response( $response );\n+\t\t$response->set_status( 201 );\n+\t\t$response->header( 'Location', json_url( '/wp/posts/' . $post_id ) );\n+\n+\t\treturn $response;\n+\t}\n+\n+\t/**\n+\t * Update a single post\n+\t *\n+\t * @param WP_JSON_Request $request Full details about the request\n+\t * @return WP_Error|WP_HTTP_ResponseInterface\n+\t */\n+\tpublic function update_item( $request ) {\n+\t\t$id = (int) $request['id'];\n+\t\t$post = get_post( $id );\n+\n+\t\tif ( ! $post ) {\n+\t\t\treturn new WP_Error( 'json_post_invalid_id', __( 'Post ID is invalid.' ), array( 'status' => 400 ) );\n+\t\t}\n+\n+\t\tif ( ! $this->check_edit_permission( $post ) ) {\n+\t\t\treturn new WP_Error( 'json_post_cannot_edit', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => 403 ) );\n+\t\t}\n+\n+\t\t$post = $this->prepare_item_for_database( $request );\n+\t\tif ( is_wp_error( $post ) ) {\n+\t\t\treturn $post;\n+\t\t}\n+\n+\t\t$post_id = wp_update_post( $post );\n+\t\tif ( is_wp_error( $post_id ) ) {\n+\t\t\treturn $post_id;\n+\t\t}\n+\n+\t\tdo_action( 'json_insert_post', $post, $request, false );\n+\n+\t\t$response = $this->get_item( array(\n+\t\t\t'id'      => $post_id,\n+\t\t\t'context' => 'edit',\n+\t\t));\n+\t\t$response = json_ensure_response( $response );\n+\t\t$response->set_status( 201 );\n+\t\t$response->header( 'Location', json_url( '/wp/posts/' . $post_id ) );\n+\n+\t\treturn $response;\n+\t}\n+\n+\t/**\n+\t * Delete a single post\n+\t *\n+\t * @param WP_JSON_Request $request Full details about the request\n+\t * @return array|WP_Error\n+\t */\n+\tpublic function delete_item( $request ) {\n+\n+\t}\n+\n+\t/**\n+\t * Prepare a single post output for response\n+\t *\n+\t * @param WP_Post $post Post object\n+\t * @param WP_JSON_Request $request Request object\n+\t * @return array $data\n+\t */\n+\tpublic function prepare_item_for_response( $post, $request ) {\n+\t\t$request['context'] = isset( $request['context'] ) ? sanitize_text_field( $request['context'] ) : 'view';\n+\n+\t\t$data = array(\n+\t\t\t'id'             => $post->ID,\n+\t\t\t'title'          => array(\n+\t\t\t\t'rendered'       => get_the_title( $post->ID ),\n+\t\t\t),\n+\t\t\t'content'        => array(\n+\t\t\t\t'rendered'       => apply_filters( 'the_content', $post->post_content ),\n+\t\t\t),\n+\t\t\t'excerpt'        => array(\n+\t\t\t\t'rendered'       => $this->prepare_excerpt_response( $post->post_excerpt ),\n+\t\t\t),\n+\t\t\t'type'           => $post->post_type,\n+\t\t\t'format'         => get_post_format( $post->ID ),\n+\t\t\t'parent'         => (int) $post->post_parent,\n+\t\t\t'slug'           => $post->post_name,\n+\t\t\t'link'           => get_permalink( $post->ID ),\n+\t\t\t'guid'           => array(\n+\t\t\t\t'rendered'       => apply_filters( 'get_the_guid', $post->guid ),\n+\t\t\t),\n+\t\t\t'author'         => (int) $post->post_author,\n+\t\t\t'comment_status' => $post->comment_status,\n+\t\t\t'ping_status'    => $post->ping_status,\n+\t\t\t'sticky'         => ( 'post' === $post->post_type && is_sticky( $post->ID ) ),\n+\t\t\t'menu_order'     => (int) $post->menu_order,\n+\t\t\t'date'           => $this->prepare_date_response( $post->post_date ),","path":"lib/class-wp-json-posts-controller.php","position":292,"original_position":234,"commit_id":"37d861b273885cb0235aecd53f00a0944da19af6","original_commit_id":"a76025428a2d28b914e7b3998d304eae24ca0e02","user":{"login":"rachelbaker","id":979807,"avatar_url":"https://avatars.githubusercontent.com/u/979807?v=3","gravatar_id":"","url":"https://api.github.com/users/rachelbaker","html_url":"https://github.com/rachelbaker","followers_url":"https://api.github.com/users/rachelbaker/followers","following_url":"https://api.github.com/users/rachelbaker/following{/other_user}","gists_url":"https://api.github.com/users/rachelbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelbaker/subscriptions","organizations_url":"https://api.github.com/users/rachelbaker/orgs","repos_url":"https://api.github.com/users/rachelbaker/repos","events_url":"https://api.github.com/users/rachelbaker/events{/privacy}","received_events_url":"https://api.github.com/users/rachelbaker/received_events","type":"User","site_admin":false},"body":"Related to #605 \r\n","created_at":"2014-12-09T20:58:15Z","updated_at":"2014-12-09T20:58:15Z","html_url":"https://github.com/WP-API/WP-API/pull/684#discussion_r21561637","pull_request_url":"https://api.github.com/repos/WP-API/WP-API/pulls/684","_links":{"self":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/21561637"},"html":{"href":"https://github.com/WP-API/WP-API/pull/684#discussion_r21561637"},"pull_request":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/684"}}},"pull_request":{"url":"https://api.github.com/repos/WP-API/WP-API/pulls/684","id":25531374,"html_url":"https://github.com/WP-API/WP-API/pull/684","diff_url":"https://github.com/WP-API/WP-API/pull/684.diff","patch_url":"https://github.com/WP-API/WP-API/pull/684.patch","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/684","number":684,"state":"open","locked":false,"title":"Initial pass at new style Posts Controller ","user":{"login":"rachelbaker","id":979807,"avatar_url":"https://avatars.githubusercontent.com/u/979807?v=3","gravatar_id":"","url":"https://api.github.com/users/rachelbaker","html_url":"https://github.com/rachelbaker","followers_url":"https://api.github.com/users/rachelbaker/followers","following_url":"https://api.github.com/users/rachelbaker/following{/other_user}","gists_url":"https://api.github.com/users/rachelbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelbaker/subscriptions","organizations_url":"https://api.github.com/users/rachelbaker/orgs","repos_url":"https://api.github.com/users/rachelbaker/repos","events_url":"https://api.github.com/users/rachelbaker/events{/privacy}","received_events_url":"https://api.github.com/users/rachelbaker/received_events","type":"User","site_admin":false},"body":"Initial Controller routes and methods:\r\n\r\n- [x] get all posts\r\n- [x] get a post\r\n- [x] get revisions for a post\r\n- [x] create a post\r\n- [x] update a post\r\n- [x] delete a post\r\n\r\nTest coverage routes and methods:\r\n\r\n- [x] get all posts\r\n- [x] get single post\r\n- [x] get revisions for a post\r\n- [x] create a post\r\n- [x] update a post\r\n- [x] delete a post","created_at":"2014-12-04T21:48:03Z","updated_at":"2014-12-09T20:58:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f2966c0b6a7994515de4e1f86463c398590cb05","assignee":null,"milestone":{"url":"https://api.github.com/repos/WP-API/WP-API/milestones/10","labels_url":"https://api.github.com/repos/WP-API/WP-API/milestones/10/labels","id":844496,"number":10,"title":"2.0","description":null,"creator":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":59,"state":"open","created_at":"2014-10-29T00:12:18Z","updated_at":"2014-12-09T20:55:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/WP-API/WP-API/pulls/684/commits","review_comments_url":"https://api.github.com/repos/WP-API/WP-API/pulls/684/comments","review_comment_url":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/{number}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/684/comments","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/37d861b273885cb0235aecd53f00a0944da19af6","head":{"label":"WP-API:two-posts-routes","ref":"two-posts-routes","sha":"37d861b273885cb0235aecd53f00a0944da19af6","user":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"repo":{"id":10420996,"name":"WP-API","full_name":"WP-API/WP-API","owner":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WP-API/WP-API","description":"A JSON-based REST API for WordPress","fork":false,"url":"https://api.github.com/repos/WP-API/WP-API","forks_url":"https://api.github.com/repos/WP-API/WP-API/forks","keys_url":"https://api.github.com/repos/WP-API/WP-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WP-API/WP-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WP-API/WP-API/teams","hooks_url":"https://api.github.com/repos/WP-API/WP-API/hooks","issue_events_url":"https://api.github.com/repos/WP-API/WP-API/issues/events{/number}","events_url":"https://api.github.com/repos/WP-API/WP-API/events","assignees_url":"https://api.github.com/repos/WP-API/WP-API/assignees{/user}","branches_url":"https://api.github.com/repos/WP-API/WP-API/branches{/branch}","tags_url":"https://api.github.com/repos/WP-API/WP-API/tags","blobs_url":"https://api.github.com/repos/WP-API/WP-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WP-API/WP-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WP-API/WP-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/WP-API/WP-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/{sha}","languages_url":"https://api.github.com/repos/WP-API/WP-API/languages","stargazers_url":"https://api.github.com/repos/WP-API/WP-API/stargazers","contributors_url":"https://api.github.com/repos/WP-API/WP-API/contributors","subscribers_url":"https://api.github.com/repos/WP-API/WP-API/subscribers","subscription_url":"https://api.github.com/repos/WP-API/WP-API/subscription","commits_url":"https://api.github.com/repos/WP-API/WP-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/WP-API/WP-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/WP-API/WP-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/WP-API/WP-API/issues/comments/{number}","contents_url":"https://api.github.com/repos/WP-API/WP-API/contents/{+path}","compare_url":"https://api.github.com/repos/WP-API/WP-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WP-API/WP-API/merges","archive_url":"https://api.github.com/repos/WP-API/WP-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WP-API/WP-API/downloads","issues_url":"https://api.github.com/repos/WP-API/WP-API/issues{/number}","pulls_url":"https://api.github.com/repos/WP-API/WP-API/pulls{/number}","milestones_url":"https://api.github.com/repos/WP-API/WP-API/milestones{/number}","notifications_url":"https://api.github.com/repos/WP-API/WP-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WP-API/WP-API/labels{/name}","releases_url":"https://api.github.com/repos/WP-API/WP-API/releases{/id}","created_at":"2013-06-01T10:52:43Z","updated_at":"2014-12-09T20:36:14Z","pushed_at":"2014-12-09T20:36:50Z","git_url":"git://github.com/WP-API/WP-API.git","ssh_url":"git@github.com:WP-API/WP-API.git","clone_url":"https://github.com/WP-API/WP-API.git","svn_url":"https://github.com/WP-API/WP-API","homepage":null,"size":4581,"stargazers_count":1305,"watchers_count":1305,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":171,"forks":248,"open_issues":171,"watchers":1305,"default_branch":"develop"}},"base":{"label":"WP-API:develop","ref":"develop","sha":"eeafc9e762bdee22b52b8798430936d8d2abd054","user":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"repo":{"id":10420996,"name":"WP-API","full_name":"WP-API/WP-API","owner":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WP-API/WP-API","description":"A JSON-based REST API for WordPress","fork":false,"url":"https://api.github.com/repos/WP-API/WP-API","forks_url":"https://api.github.com/repos/WP-API/WP-API/forks","keys_url":"https://api.github.com/repos/WP-API/WP-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WP-API/WP-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WP-API/WP-API/teams","hooks_url":"https://api.github.com/repos/WP-API/WP-API/hooks","issue_events_url":"https://api.github.com/repos/WP-API/WP-API/issues/events{/number}","events_url":"https://api.github.com/repos/WP-API/WP-API/events","assignees_url":"https://api.github.com/repos/WP-API/WP-API/assignees{/user}","branches_url":"https://api.github.com/repos/WP-API/WP-API/branches{/branch}","tags_url":"https://api.github.com/repos/WP-API/WP-API/tags","blobs_url":"https://api.github.com/repos/WP-API/WP-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WP-API/WP-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WP-API/WP-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/WP-API/WP-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/{sha}","languages_url":"https://api.github.com/repos/WP-API/WP-API/languages","stargazers_url":"https://api.github.com/repos/WP-API/WP-API/stargazers","contributors_url":"https://api.github.com/repos/WP-API/WP-API/contributors","subscribers_url":"https://api.github.com/repos/WP-API/WP-API/subscribers","subscription_url":"https://api.github.com/repos/WP-API/WP-API/subscription","commits_url":"https://api.github.com/repos/WP-API/WP-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/WP-API/WP-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/WP-API/WP-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/WP-API/WP-API/issues/comments/{number}","contents_url":"https://api.github.com/repos/WP-API/WP-API/contents/{+path}","compare_url":"https://api.github.com/repos/WP-API/WP-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WP-API/WP-API/merges","archive_url":"https://api.github.com/repos/WP-API/WP-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WP-API/WP-API/downloads","issues_url":"https://api.github.com/repos/WP-API/WP-API/issues{/number}","pulls_url":"https://api.github.com/repos/WP-API/WP-API/pulls{/number}","milestones_url":"https://api.github.com/repos/WP-API/WP-API/milestones{/number}","notifications_url":"https://api.github.com/repos/WP-API/WP-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WP-API/WP-API/labels{/name}","releases_url":"https://api.github.com/repos/WP-API/WP-API/releases{/id}","created_at":"2013-06-01T10:52:43Z","updated_at":"2014-12-09T20:36:14Z","pushed_at":"2014-12-09T20:36:50Z","git_url":"git://github.com/WP-API/WP-API.git","ssh_url":"git@github.com:WP-API/WP-API.git","clone_url":"https://github.com/WP-API/WP-API.git","svn_url":"https://github.com/WP-API/WP-API","homepage":null,"size":4581,"stargazers_count":1305,"watchers_count":1305,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":171,"forks":248,"open_issues":171,"watchers":1305,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/684"},"html":{"href":"https://github.com/WP-API/WP-API/pull/684"},"issue":{"href":"https://api.github.com/repos/WP-API/WP-API/issues/684"},"comments":{"href":"https://api.github.com/repos/WP-API/WP-API/issues/684/comments"},"review_comments":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/684/comments"},"review_comment":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/684/commits"},"statuses":{"href":"https://api.github.com/repos/WP-API/WP-API/statuses/37d861b273885cb0235aecd53f00a0944da19af6"}}}}