{"action":"closed","number":143,"pull_request":{"url":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/143","id":203812073,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODEyMDcz","html_url":"https://github.com/snarfed/wordpress-micropub/pull/143","diff_url":"https://github.com/snarfed/wordpress-micropub/pull/143.diff","patch_url":"https://github.com/snarfed/wordpress-micropub/pull/143.patch","issue_url":"https://api.github.com/repos/snarfed/wordpress-micropub/issues/143","number":143,"state":"closed","locked":false,"title":"Introduce REST API endpoint","user":{"login":"dshanske","id":7278204,"node_id":"MDQ6VXNlcjcyNzgyMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7278204?v=4","gravatar_id":"","url":"https://api.github.com/users/dshanske","html_url":"https://github.com/dshanske","followers_url":"https://api.github.com/users/dshanske/followers","following_url":"https://api.github.com/users/dshanske/following{/other_user}","gists_url":"https://api.github.com/users/dshanske/gists{/gist_id}","starred_url":"https://api.github.com/users/dshanske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshanske/subscriptions","organizations_url":"https://api.github.com/users/dshanske/orgs","repos_url":"https://api.github.com/users/dshanske/repos","events_url":"https://api.github.com/users/dshanske/events{/privacy}","received_events_url":"https://api.github.com/users/dshanske/received_events","type":"User","site_admin":false},"body":"This is still in process, but as the initial code functionality is there, and I'm still working on the test functionality(though you can see the start of it in the test_endpoint file). Wanted to ask for a review/feedback at this stage, as this is the most drastic of the changes I'll be doing out of all these PRs.\r\n\r\nWill not be merging this commit till the unit tests are reimplemented using the new code. I also have some ideas for new tests that I'll likely put in once this is merged in. Specifically, user permissions test improvements, additional authorization tests with the new endpoint and related code, etc.\r\n\r\nThis PR switches the endpoint over to the REST functionality. To minimize the change here, it still uses the load_input to change over from the new endpoint into the mostly unchanged code.\r\n\r\nThe new unit tests will work similarly to the ones that are in the media endpoint, building the request using the WP_REST_Request class which simulates a payload, and the dispatch function which runs that payload through the endpoint, and testing the WP_REST_Response output.\r\n\r\n\r\n","created_at":"2018-07-25T11:53:23Z","updated_at":"2018-08-03T01:27:48Z","closed_at":"2018-08-03T01:27:48Z","merged_at":"2018-08-03T01:27:48Z","merge_commit_sha":"39634553e866ffaf3e99c725cde187077f2569d3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pfefferle","id":2373,"node_id":"MDQ6VXNlcjIzNzM=","avatar_url":"https://avatars1.githubusercontent.com/u/2373?v=4","gravatar_id":"","url":"https://api.github.com/users/pfefferle","html_url":"https://github.com/pfefferle","followers_url":"https://api.github.com/users/pfefferle/followers","following_url":"https://api.github.com/users/pfefferle/following{/other_user}","gists_url":"https://api.github.com/users/pfefferle/gists{/gist_id}","starred_url":"https://api.github.com/users/pfefferle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfefferle/subscriptions","organizations_url":"https://api.github.com/users/pfefferle/orgs","repos_url":"https://api.github.com/users/pfefferle/repos","events_url":"https://api.github.com/users/pfefferle/events{/privacy}","received_events_url":"https://api.github.com/users/pfefferle/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/143/commits","review_comments_url":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/143/comments","review_comment_url":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snarfed/wordpress-micropub/issues/143/comments","statuses_url":"https://api.github.com/repos/snarfed/wordpress-micropub/statuses/aae5e8502170a4190bb7e903450c7496bd25e49f","head":{"label":"dshanske:rest","ref":"rest","sha":"aae5e8502170a4190bb7e903450c7496bd25e49f","user":{"login":"dshanske","id":7278204,"node_id":"MDQ6VXNlcjcyNzgyMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7278204?v=4","gravatar_id":"","url":"https://api.github.com/users/dshanske","html_url":"https://github.com/dshanske","followers_url":"https://api.github.com/users/dshanske/followers","following_url":"https://api.github.com/users/dshanske/following{/other_user}","gists_url":"https://api.github.com/users/dshanske/gists{/gist_id}","starred_url":"https://api.github.com/users/dshanske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshanske/subscriptions","organizations_url":"https://api.github.com/users/dshanske/orgs","repos_url":"https://api.github.com/users/dshanske/repos","events_url":"https://api.github.com/users/dshanske/events{/privacy}","received_events_url":"https://api.github.com/users/dshanske/received_events","type":"User","site_admin":false},"repo":{"id":30734997,"node_id":"MDEwOlJlcG9zaXRvcnkzMDczNDk5Nw==","name":"wordpress-micropub","full_name":"dshanske/wordpress-micropub","owner":{"login":"dshanske","id":7278204,"node_id":"MDQ6VXNlcjcyNzgyMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7278204?v=4","gravatar_id":"","url":"https://api.github.com/users/dshanske","html_url":"https://github.com/dshanske","followers_url":"https://api.github.com/users/dshanske/followers","following_url":"https://api.github.com/users/dshanske/following{/other_user}","gists_url":"https://api.github.com/users/dshanske/gists{/gist_id}","starred_url":"https://api.github.com/users/dshanske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshanske/subscriptions","organizations_url":"https://api.github.com/users/dshanske/orgs","repos_url":"https://api.github.com/users/dshanske/repos","events_url":"https://api.github.com/users/dshanske/events{/privacy}","received_events_url":"https://api.github.com/users/dshanske/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dshanske/wordpress-micropub","description":"A Micropub server plugin for WordPress","fork":true,"url":"https://api.github.com/repos/dshanske/wordpress-micropub","forks_url":"https://api.github.com/repos/dshanske/wordpress-micropub/forks","keys_url":"https://api.github.com/repos/dshanske/wordpress-micropub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dshanske/wordpress-micropub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dshanske/wordpress-micropub/teams","hooks_url":"https://api.github.com/repos/dshanske/wordpress-micropub/hooks","issue_events_url":"https://api.github.com/repos/dshanske/wordpress-micropub/issues/events{/number}","events_url":"https://api.github.com/repos/dshanske/wordpress-micropub/events","assignees_url":"https://api.github.com/repos/dshanske/wordpress-micropub/assignees{/user}","branches_url":"https://api.github.com/repos/dshanske/wordpress-micropub/branches{/branch}","tags_url":"https://api.github.com/repos/dshanske/wordpress-micropub/tags","blobs_url":"https://api.github.com/repos/dshanske/wordpress-micropub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dshanske/wordpress-micropub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dshanske/wordpress-micropub/git/refs{/sha}","trees_url":"https://api.github.com/repos/dshanske/wordpress-micropub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dshanske/wordpress-micropub/statuses/{sha}","languages_url":"https://api.github.com/repos/dshanske/wordpress-micropub/languages","stargazers_url":"https://api.github.com/repos/dshanske/wordpress-micropub/stargazers","contributors_url":"https://api.github.com/repos/dshanske/wordpress-micropub/contributors","subscribers_url":"https://api.github.com/repos/dshanske/wordpress-micropub/subscribers","subscription_url":"https://api.github.com/repos/dshanske/wordpress-micropub/subscription","commits_url":"https://api.github.com/repos/dshanske/wordpress-micropub/commits{/sha}","git_commits_url":"https://api.github.com/repos/dshanske/wordpress-micropub/git/commits{/sha}","comments_url":"https://api.github.com/repos/dshanske/wordpress-micropub/comments{/number}","issue_comment_url":"https://api.github.com/repos/dshanske/wordpress-micropub/issues/comments{/number}","contents_url":"https://api.github.com/repos/dshanske/wordpress-micropub/contents/{+path}","compare_url":"https://api.github.com/repos/dshanske/wordpress-micropub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dshanske/wordpress-micropub/merges","archive_url":"https://api.github.com/repos/dshanske/wordpress-micropub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dshanske/wordpress-micropub/downloads","issues_url":"https://api.github.com/repos/dshanske/wordpress-micropub/issues{/number}","pulls_url":"https://api.github.com/repos/dshanske/wordpress-micropub/pulls{/number}","milestones_url":"https://api.github.com/repos/dshanske/wordpress-micropub/milestones{/number}","notifications_url":"https://api.github.com/repos/dshanske/wordpress-micropub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dshanske/wordpress-micropub/labels{/name}","releases_url":"https://api.github.com/repos/dshanske/wordpress-micropub/releases{/id}","deployments_url":"https://api.github.com/repos/dshanske/wordpress-micropub/deployments","created_at":"2015-02-13T01:41:50Z","updated_at":"2018-07-25T04:16:42Z","pushed_at":"2018-08-03T01:15:47Z","git_url":"git://github.com/dshanske/wordpress-micropub.git","ssh_url":"git@github.com:dshanske/wordpress-micropub.git","clone_url":"https://github.com/dshanske/wordpress-micropub.git","svn_url":"https://github.com/dshanske/wordpress-micropub","homepage":null,"size":670,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"snarfed:master","ref":"master","sha":"71a4b280daf0acf66dd218cab231d755c1bde8bf","user":{"login":"snarfed","id":778068,"node_id":"MDQ6VXNlcjc3ODA2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/778068?v=4","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"repo":{"id":30504958,"node_id":"MDEwOlJlcG9zaXRvcnkzMDUwNDk1OA==","name":"wordpress-micropub","full_name":"snarfed/wordpress-micropub","owner":{"login":"snarfed","id":778068,"node_id":"MDQ6VXNlcjc3ODA2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/778068?v=4","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snarfed/wordpress-micropub","description":"A Micropub server plugin for WordPress","fork":false,"url":"https://api.github.com/repos/snarfed/wordpress-micropub","forks_url":"https://api.github.com/repos/snarfed/wordpress-micropub/forks","keys_url":"https://api.github.com/repos/snarfed/wordpress-micropub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snarfed/wordpress-micropub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snarfed/wordpress-micropub/teams","hooks_url":"https://api.github.com/repos/snarfed/wordpress-micropub/hooks","issue_events_url":"https://api.github.com/repos/snarfed/wordpress-micropub/issues/events{/number}","events_url":"https://api.github.com/repos/snarfed/wordpress-micropub/events","assignees_url":"https://api.github.com/repos/snarfed/wordpress-micropub/assignees{/user}","branches_url":"https://api.github.com/repos/snarfed/wordpress-micropub/branches{/branch}","tags_url":"https://api.github.com/repos/snarfed/wordpress-micropub/tags","blobs_url":"https://api.github.com/repos/snarfed/wordpress-micropub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snarfed/wordpress-micropub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snarfed/wordpress-micropub/git/refs{/sha}","trees_url":"https://api.github.com/repos/snarfed/wordpress-micropub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snarfed/wordpress-micropub/statuses/{sha}","languages_url":"https://api.github.com/repos/snarfed/wordpress-micropub/languages","stargazers_url":"https://api.github.com/repos/snarfed/wordpress-micropub/stargazers","contributors_url":"https://api.github.com/repos/snarfed/wordpress-micropub/contributors","subscribers_url":"https://api.github.com/repos/snarfed/wordpress-micropub/subscribers","subscription_url":"https://api.github.com/repos/snarfed/wordpress-micropub/subscription","commits_url":"https://api.github.com/repos/snarfed/wordpress-micropub/commits{/sha}","git_commits_url":"https://api.github.com/repos/snarfed/wordpress-micropub/git/commits{/sha}","comments_url":"https://api.github.com/repos/snarfed/wordpress-micropub/comments{/number}","issue_comment_url":"https://api.github.com/repos/snarfed/wordpress-micropub/issues/comments{/number}","contents_url":"https://api.github.com/repos/snarfed/wordpress-micropub/contents/{+path}","compare_url":"https://api.github.com/repos/snarfed/wordpress-micropub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snarfed/wordpress-micropub/merges","archive_url":"https://api.github.com/repos/snarfed/wordpress-micropub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snarfed/wordpress-micropub/downloads","issues_url":"https://api.github.com/repos/snarfed/wordpress-micropub/issues{/number}","pulls_url":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls{/number}","milestones_url":"https://api.github.com/repos/snarfed/wordpress-micropub/milestones{/number}","notifications_url":"https://api.github.com/repos/snarfed/wordpress-micropub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snarfed/wordpress-micropub/labels{/name}","releases_url":"https://api.github.com/repos/snarfed/wordpress-micropub/releases{/id}","deployments_url":"https://api.github.com/repos/snarfed/wordpress-micropub/deployments","created_at":"2015-02-08T20:39:22Z","updated_at":"2018-07-25T04:16:25Z","pushed_at":"2018-08-03T01:27:48Z","git_url":"git://github.com/snarfed/wordpress-micropub.git","ssh_url":"git@github.com:snarfed/wordpress-micropub.git","clone_url":"https://github.com/snarfed/wordpress-micropub.git","svn_url":"https://github.com/snarfed/wordpress-micropub","homepage":null,"size":523,"stargazers_count":29,"watchers_count":29,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":20,"license":null,"forks":9,"open_issues":20,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/143"},"html":{"href":"https://github.com/snarfed/wordpress-micropub/pull/143"},"issue":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/issues/143"},"comments":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/snarfed/wordpress-micropub/statuses/aae5e8502170a4190bb7e903450c7496bd25e49f"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"dshanske","id":7278204,"node_id":"MDQ6VXNlcjcyNzgyMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7278204?v=4","gravatar_id":"","url":"https://api.github.com/users/dshanske","html_url":"https://github.com/dshanske","followers_url":"https://api.github.com/users/dshanske/followers","following_url":"https://api.github.com/users/dshanske/following{/other_user}","gists_url":"https://api.github.com/users/dshanske/gists{/gist_id}","starred_url":"https://api.github.com/users/dshanske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshanske/subscriptions","organizations_url":"https://api.github.com/users/dshanske/orgs","repos_url":"https://api.github.com/users/dshanske/repos","events_url":"https://api.github.com/users/dshanske/events{/privacy}","received_events_url":"https://api.github.com/users/dshanske/received_events","type":"User","site_admin":false},"comments":5,"review_comments":29,"maintainer_can_modify":false,"commits":11,"additions":1040,"deletions":232,"changed_files":7}}
{"actor":{"display_login":"dshanske"}}