{"action":"closed","number":220,"pull_request":{"url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/220","id":83951889,"html_url":"https://github.com/digitalmethodsinitiative/dmi-tcat/pull/220","diff_url":"https://github.com/digitalmethodsinitiative/dmi-tcat/pull/220.diff","patch_url":"https://github.com/digitalmethodsinitiative/dmi-tcat/pull/220.patch","issue_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/220","number":220,"state":"closed","locked":false,"title":"RESTful API enhancements","user":{"login":"hoylen","id":1381377,"avatar_url":"https://avatars.githubusercontent.com/u/1381377?v=3","gravatar_id":"","url":"https://api.github.com/users/hoylen","html_url":"https://github.com/hoylen","followers_url":"https://api.github.com/users/hoylen/followers","following_url":"https://api.github.com/users/hoylen/following{/other_user}","gists_url":"https://api.github.com/users/hoylen/gists{/gist_id}","starred_url":"https://api.github.com/users/hoylen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoylen/subscriptions","organizations_url":"https://api.github.com/users/hoylen/orgs","repos_url":"https://api.github.com/users/hoylen/repos","events_url":"https://api.github.com/users/hoylen/events{/privacy}","received_events_url":"https://api.github.com/users/hoylen/received_events","type":"User","site_admin":false},"body":"A few minor enhancements to the APIs.\r\n\r\n1. Added JSON representations for the two operations that didn't support it. This consistency makes the API easy to use/document, since we don't have to remember which operations support JSON and which don't.\r\n\r\n2. Added plain text representations for all the operations. The code was there already (to support invoking the scripts from the command line) so it wasn't much effort to also support \"text/plain\" when invoked by HTTP. Might be useful when using _curl_ from a remote machine, to get the same results as invoking the PHP script from the command line on the server machine.\r\n\r\n3. Added extra error checking to raise an error when `startdate` or `enddate` query parameters are provided in the HTTP request, but are not relevant to the operation being performed. This is better than silently ignoring the parameter(s), since the user has probably does something unexpected/wrong by supplying them.\r\n\r\nThe API has now been documented on the [wiki](https://github.com/digitalmethodsinitiative/dmi-tcat/wiki/API).\r\n\r\nAs usual, the pull request can be tested by explicitly installing its repository/branch for testing:\r\n\r\n    ./tcat-install-linux.sh -R https://github.com/hoylen/dmi-tcat.git -B restful-api-enhancements  -l -c myconfig.cfg\r\n\r\n_P.S. This is probably going to be my last contribution. Other API operations can be added to make the APIs more useful, but I suggest getting DMI-TCAT working with PHP7 should be the main priority before adding more functionality; that will also get rid of the \"deprecated function\" warnings to improve the signal-to-noise ratio of the logs and make debugging more easy._","created_at":"2016-09-05T05:32:56Z","updated_at":"2016-09-05T13:32:55Z","closed_at":"2016-09-05T13:32:54Z","merged_at":"2016-09-05T13:32:54Z","merge_commit_sha":"60dc24eb14f4a2cbc223e732b8df9935c0e8af44","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/220/commits","review_comments_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/220/comments","review_comment_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/220/comments","statuses_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/statuses/76bb7e5fb3c3ddeabb066ef36d08e79832fd2f78","head":{"label":"hoylen:restful-api-enhancements","ref":"restful-api-enhancements","sha":"76bb7e5fb3c3ddeabb066ef36d08e79832fd2f78","user":{"login":"hoylen","id":1381377,"avatar_url":"https://avatars.githubusercontent.com/u/1381377?v=3","gravatar_id":"","url":"https://api.github.com/users/hoylen","html_url":"https://github.com/hoylen","followers_url":"https://api.github.com/users/hoylen/followers","following_url":"https://api.github.com/users/hoylen/following{/other_user}","gists_url":"https://api.github.com/users/hoylen/gists{/gist_id}","starred_url":"https://api.github.com/users/hoylen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoylen/subscriptions","organizations_url":"https://api.github.com/users/hoylen/orgs","repos_url":"https://api.github.com/users/hoylen/repos","events_url":"https://api.github.com/users/hoylen/events{/privacy}","received_events_url":"https://api.github.com/users/hoylen/received_events","type":"User","site_admin":false},"repo":{"id":54001063,"name":"dmi-tcat","full_name":"hoylen/dmi-tcat","owner":{"login":"hoylen","id":1381377,"avatar_url":"https://avatars.githubusercontent.com/u/1381377?v=3","gravatar_id":"","url":"https://api.github.com/users/hoylen","html_url":"https://github.com/hoylen","followers_url":"https://api.github.com/users/hoylen/followers","following_url":"https://api.github.com/users/hoylen/following{/other_user}","gists_url":"https://api.github.com/users/hoylen/gists{/gist_id}","starred_url":"https://api.github.com/users/hoylen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoylen/subscriptions","organizations_url":"https://api.github.com/users/hoylen/orgs","repos_url":"https://api.github.com/users/hoylen/repos","events_url":"https://api.github.com/users/hoylen/events{/privacy}","received_events_url":"https://api.github.com/users/hoylen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hoylen/dmi-tcat","description":"Digital Methods Initiative - Twitter Capture and Analysis Toolset","fork":true,"url":"https://api.github.com/repos/hoylen/dmi-tcat","forks_url":"https://api.github.com/repos/hoylen/dmi-tcat/forks","keys_url":"https://api.github.com/repos/hoylen/dmi-tcat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoylen/dmi-tcat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoylen/dmi-tcat/teams","hooks_url":"https://api.github.com/repos/hoylen/dmi-tcat/hooks","issue_events_url":"https://api.github.com/repos/hoylen/dmi-tcat/issues/events{/number}","events_url":"https://api.github.com/repos/hoylen/dmi-tcat/events","assignees_url":"https://api.github.com/repos/hoylen/dmi-tcat/assignees{/user}","branches_url":"https://api.github.com/repos/hoylen/dmi-tcat/branches{/branch}","tags_url":"https://api.github.com/repos/hoylen/dmi-tcat/tags","blobs_url":"https://api.github.com/repos/hoylen/dmi-tcat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoylen/dmi-tcat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoylen/dmi-tcat/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoylen/dmi-tcat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoylen/dmi-tcat/statuses/{sha}","languages_url":"https://api.github.com/repos/hoylen/dmi-tcat/languages","stargazers_url":"https://api.github.com/repos/hoylen/dmi-tcat/stargazers","contributors_url":"https://api.github.com/repos/hoylen/dmi-tcat/contributors","subscribers_url":"https://api.github.com/repos/hoylen/dmi-tcat/subscribers","subscription_url":"https://api.github.com/repos/hoylen/dmi-tcat/subscription","commits_url":"https://api.github.com/repos/hoylen/dmi-tcat/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoylen/dmi-tcat/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoylen/dmi-tcat/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoylen/dmi-tcat/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoylen/dmi-tcat/contents/{+path}","compare_url":"https://api.github.com/repos/hoylen/dmi-tcat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoylen/dmi-tcat/merges","archive_url":"https://api.github.com/repos/hoylen/dmi-tcat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoylen/dmi-tcat/downloads","issues_url":"https://api.github.com/repos/hoylen/dmi-tcat/issues{/number}","pulls_url":"https://api.github.com/repos/hoylen/dmi-tcat/pulls{/number}","milestones_url":"https://api.github.com/repos/hoylen/dmi-tcat/milestones{/number}","notifications_url":"https://api.github.com/repos/hoylen/dmi-tcat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoylen/dmi-tcat/labels{/name}","releases_url":"https://api.github.com/repos/hoylen/dmi-tcat/releases{/id}","deployments_url":"https://api.github.com/repos/hoylen/dmi-tcat/deployments","created_at":"2016-03-16T04:34:53Z","updated_at":"2016-03-16T04:34:54Z","pushed_at":"2016-09-05T06:45:23Z","git_url":"git://github.com/hoylen/dmi-tcat.git","ssh_url":"git@github.com:hoylen/dmi-tcat.git","clone_url":"https://github.com/hoylen/dmi-tcat.git","svn_url":"https://github.com/hoylen/dmi-tcat","homepage":null,"size":3609,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"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":"digitalmethodsinitiative:master","ref":"master","sha":"830652ee138bb931ce448d94e1f4a3669454c851","user":{"login":"digitalmethodsinitiative","id":3939707,"avatar_url":"https://avatars.githubusercontent.com/u/3939707?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalmethodsinitiative","html_url":"https://github.com/digitalmethodsinitiative","followers_url":"https://api.github.com/users/digitalmethodsinitiative/followers","following_url":"https://api.github.com/users/digitalmethodsinitiative/following{/other_user}","gists_url":"https://api.github.com/users/digitalmethodsinitiative/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalmethodsinitiative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalmethodsinitiative/subscriptions","organizations_url":"https://api.github.com/users/digitalmethodsinitiative/orgs","repos_url":"https://api.github.com/users/digitalmethodsinitiative/repos","events_url":"https://api.github.com/users/digitalmethodsinitiative/events{/privacy}","received_events_url":"https://api.github.com/users/digitalmethodsinitiative/received_events","type":"Organization","site_admin":false},"repo":{"id":9342075,"name":"dmi-tcat","full_name":"digitalmethodsinitiative/dmi-tcat","owner":{"login":"digitalmethodsinitiative","id":3939707,"avatar_url":"https://avatars.githubusercontent.com/u/3939707?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalmethodsinitiative","html_url":"https://github.com/digitalmethodsinitiative","followers_url":"https://api.github.com/users/digitalmethodsinitiative/followers","following_url":"https://api.github.com/users/digitalmethodsinitiative/following{/other_user}","gists_url":"https://api.github.com/users/digitalmethodsinitiative/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalmethodsinitiative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalmethodsinitiative/subscriptions","organizations_url":"https://api.github.com/users/digitalmethodsinitiative/orgs","repos_url":"https://api.github.com/users/digitalmethodsinitiative/repos","events_url":"https://api.github.com/users/digitalmethodsinitiative/events{/privacy}","received_events_url":"https://api.github.com/users/digitalmethodsinitiative/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/digitalmethodsinitiative/dmi-tcat","description":"Digital Methods Initiative - Twitter Capture and Analysis Toolset","fork":false,"url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat","forks_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/forks","keys_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/teams","hooks_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/hooks","issue_events_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/events{/number}","events_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/events","assignees_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/assignees{/user}","branches_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/branches{/branch}","tags_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/tags","blobs_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/languages","stargazers_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/stargazers","contributors_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/contributors","subscribers_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/subscribers","subscription_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/subscription","commits_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/contents/{+path}","compare_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/merges","archive_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/downloads","issues_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues{/number}","pulls_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/labels{/name}","releases_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/releases{/id}","deployments_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/deployments","created_at":"2013-04-10T08:55:15Z","updated_at":"2016-07-31T14:16:24Z","pushed_at":"2016-09-05T13:32:54Z","git_url":"git://github.com/digitalmethodsinitiative/dmi-tcat.git","ssh_url":"git@github.com:digitalmethodsinitiative/dmi-tcat.git","clone_url":"https://github.com/digitalmethodsinitiative/dmi-tcat.git","svn_url":"https://github.com/digitalmethodsinitiative/dmi-tcat","homepage":null,"size":6536,"stargazers_count":108,"watchers_count":108,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":26,"forks":30,"open_issues":26,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/220"},"html":{"href":"https://github.com/digitalmethodsinitiative/dmi-tcat/pull/220"},"issue":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/220"},"comments":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/statuses/76bb7e5fb3c3ddeabb066ef36d08e79832fd2f78"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"dentoir","id":5476482,"avatar_url":"https://avatars.githubusercontent.com/u/5476482?v=3","gravatar_id":"","url":"https://api.github.com/users/dentoir","html_url":"https://github.com/dentoir","followers_url":"https://api.github.com/users/dentoir/followers","following_url":"https://api.github.com/users/dentoir/following{/other_user}","gists_url":"https://api.github.com/users/dentoir/gists{/gist_id}","starred_url":"https://api.github.com/users/dentoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dentoir/subscriptions","organizations_url":"https://api.github.com/users/dentoir/orgs","repos_url":"https://api.github.com/users/dentoir/repos","events_url":"https://api.github.com/users/dentoir/events{/privacy}","received_events_url":"https://api.github.com/users/dentoir/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":4,"additions":72,"deletions":15,"changed_files":2}}
{"actor":{"display_login":"dentoir"}}