{"action":"created","comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/136730491","pull_request_review_id":60309099,"id":136730491,"diff_hunk":"@@ -0,0 +1,374 @@\n+<?php\n+/**\n+ * Rest API endpoints for Gutenberg blocks.\n+ */\n+class WP_Gutenberg_Block_Controller extends WP_REST_Controller {","path":"lib/class-wp-rest-gutenberg-blocks.php","position":5,"original_position":5,"commit_id":"a120b57301165ccfe71ff8306790573b45d21407","original_commit_id":"a120b57301165ccfe71ff8306790573b45d21407","user":{"login":"rmccue","id":21655,"avatar_url":"https://avatars3.githubusercontent.com/u/21655?v=4","gravatar_id":"","url":"https://api.github.com/users/rmccue","html_url":"https://github.com/rmccue","followers_url":"https://api.github.com/users/rmccue/followers","following_url":"https://api.github.com/users/rmccue/following{/other_user}","gists_url":"https://api.github.com/users/rmccue/gists{/gist_id}","starred_url":"https://api.github.com/users/rmccue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmccue/subscriptions","organizations_url":"https://api.github.com/users/rmccue/orgs","repos_url":"https://api.github.com/users/rmccue/repos","events_url":"https://api.github.com/users/rmccue/events{/privacy}","received_events_url":"https://api.github.com/users/rmccue/received_events","type":"User","site_admin":false},"body":"The filename should match the class name, so this should be `class-wp-gutenberg-block-controller.php` instead.","created_at":"2017-09-04T00:39:53Z","updated_at":"2017-09-04T00:43:46Z","html_url":"https://github.com/WordPress/gutenberg/pull/2649#discussion_r136730491","pull_request_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/136730491"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/2649#discussion_r136730491"},"pull_request":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649"}}},"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649","id":139016522,"html_url":"https://github.com/WordPress/gutenberg/pull/2649","diff_url":"https://github.com/WordPress/gutenberg/pull/2649.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/2649.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/2649","number":2649,"state":"open","locked":false,"title":"Add block rest api endpoints","user":{"login":"adamsilverstein","id":2676022,"avatar_url":"https://avatars0.githubusercontent.com/u/2676022?v=4","gravatar_id":"","url":"https://api.github.com/users/adamsilverstein","html_url":"https://github.com/adamsilverstein","followers_url":"https://api.github.com/users/adamsilverstein/followers","following_url":"https://api.github.com/users/adamsilverstein/following{/other_user}","gists_url":"https://api.github.com/users/adamsilverstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamsilverstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamsilverstein/subscriptions","organizations_url":"https://api.github.com/users/adamsilverstein/orgs","repos_url":"https://api.github.com/users/adamsilverstein/repos","events_url":"https://api.github.com/users/adamsilverstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamsilverstein/received_events","type":"User","site_admin":false},"body":"This pull request adds REST API endpoints for Gutenberg blocks, collections at `/wp-json/wp/v2/blocks/` and single posts at `/wp-json/wp/v2/blocks/{post_id}`\r\n\r\nThis provides a way to get the data and content of each block of a Gutenberg-built page from the front end. This would be very useful for building component based front ends, because the components could map one-to-one with gutenberg blocks. With these endpoints, an App could easily get the data it needs to render each component. This might also provide a patch for a standard component library matching Gutenberg blocks.","created_at":"2017-09-02T15:45:45Z","updated_at":"2017-09-04T00:43:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0de8b39670aec0ff2e839ef62d7ea901adc6fbae","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/2649/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/a120b57301165ccfe71ff8306790573b45d21407","head":{"label":"adamsilverstein:add-block-rest-endpoints","ref":"add-block-rest-endpoints","sha":"a120b57301165ccfe71ff8306790573b45d21407","user":{"login":"adamsilverstein","id":2676022,"avatar_url":"https://avatars0.githubusercontent.com/u/2676022?v=4","gravatar_id":"","url":"https://api.github.com/users/adamsilverstein","html_url":"https://github.com/adamsilverstein","followers_url":"https://api.github.com/users/adamsilverstein/followers","following_url":"https://api.github.com/users/adamsilverstein/following{/other_user}","gists_url":"https://api.github.com/users/adamsilverstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamsilverstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamsilverstein/subscriptions","organizations_url":"https://api.github.com/users/adamsilverstein/orgs","repos_url":"https://api.github.com/users/adamsilverstein/repos","events_url":"https://api.github.com/users/adamsilverstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamsilverstein/received_events","type":"User","site_admin":false},"repo":{"id":92528817,"name":"gutenberg","full_name":"adamsilverstein/gutenberg","owner":{"login":"adamsilverstein","id":2676022,"avatar_url":"https://avatars0.githubusercontent.com/u/2676022?v=4","gravatar_id":"","url":"https://api.github.com/users/adamsilverstein","html_url":"https://github.com/adamsilverstein","followers_url":"https://api.github.com/users/adamsilverstein/followers","following_url":"https://api.github.com/users/adamsilverstein/following{/other_user}","gists_url":"https://api.github.com/users/adamsilverstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamsilverstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamsilverstein/subscriptions","organizations_url":"https://api.github.com/users/adamsilverstein/orgs","repos_url":"https://api.github.com/users/adamsilverstein/repos","events_url":"https://api.github.com/users/adamsilverstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamsilverstein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamsilverstein/gutenberg","description":"Prototyping since 1440. Development hub for the editor focus in core.","fork":true,"url":"https://api.github.com/repos/adamsilverstein/gutenberg","forks_url":"https://api.github.com/repos/adamsilverstein/gutenberg/forks","keys_url":"https://api.github.com/repos/adamsilverstein/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamsilverstein/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamsilverstein/gutenberg/teams","hooks_url":"https://api.github.com/repos/adamsilverstein/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/adamsilverstein/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/adamsilverstein/gutenberg/events","assignees_url":"https://api.github.com/repos/adamsilverstein/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/adamsilverstein/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/adamsilverstein/gutenberg/tags","blobs_url":"https://api.github.com/repos/adamsilverstein/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamsilverstein/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamsilverstein/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamsilverstein/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamsilverstein/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/adamsilverstein/gutenberg/languages","stargazers_url":"https://api.github.com/repos/adamsilverstein/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/adamsilverstein/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/adamsilverstein/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/adamsilverstein/gutenberg/subscription","commits_url":"https://api.github.com/repos/adamsilverstein/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamsilverstein/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamsilverstein/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamsilverstein/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamsilverstein/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/adamsilverstein/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamsilverstein/gutenberg/merges","archive_url":"https://api.github.com/repos/adamsilverstein/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamsilverstein/gutenberg/downloads","issues_url":"https://api.github.com/repos/adamsilverstein/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/adamsilverstein/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/adamsilverstein/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/adamsilverstein/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamsilverstein/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/adamsilverstein/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/adamsilverstein/gutenberg/deployments","created_at":"2017-05-26T16:23:46Z","updated_at":"2017-05-26T16:23:48Z","pushed_at":"2017-09-02T15:44:10Z","git_url":"git://github.com/adamsilverstein/gutenberg.git","ssh_url":"git@github.com:adamsilverstein/gutenberg.git","clone_url":"https://github.com/adamsilverstein/gutenberg.git","svn_url":"https://github.com/adamsilverstein/gutenberg","homepage":"https://wordpress.github.io/gutenberg/","size":4856,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"78dd8b6e91432f6d1d3bc8cd5638baaa2d686a71","user":{"login":"WordPress","id":276006,"avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2017-09-03T07:35:16Z","pushed_at":"2017-09-03T21:52:32Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":5085,"stargazers_count":763,"watchers_count":763,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":166,"mirror_url":null,"open_issues_count":536,"forks":166,"open_issues":536,"watchers":763,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/2649"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/2649"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/2649/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/2649/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/a120b57301165ccfe71ff8306790573b45d21407"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"rmccue"}}