{"action":"closed","number":1447,"pull_request":{"url":"https://api.github.com/repos/internetarchive/openlibrary/pulls/1447","id":226439840,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NDM5ODQw","html_url":"https://github.com/internetarchive/openlibrary/pull/1447","diff_url":"https://github.com/internetarchive/openlibrary/pull/1447.diff","patch_url":"https://github.com/internetarchive/openlibrary/pull/1447.patch","issue_url":"https://api.github.com/repos/internetarchive/openlibrary/issues/1447","number":1447,"state":"closed","locked":false,"title":"fixes #1014","user":{"login":"hornc","id":905545,"node_id":"MDQ6VXNlcjkwNTU0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/905545?v=4","gravatar_id":"","url":"https://api.github.com/users/hornc","html_url":"https://github.com/hornc","followers_url":"https://api.github.com/users/hornc/followers","following_url":"https://api.github.com/users/hornc/following{/other_user}","gists_url":"https://api.github.com/users/hornc/gists{/gist_id}","starred_url":"https://api.github.com/users/hornc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornc/subscriptions","organizations_url":"https://api.github.com/users/hornc/orgs","repos_url":"https://api.github.com/users/hornc/repos","events_url":"https://api.github.com/users/hornc/events{/privacy}","received_events_url":"https://api.github.com/users/hornc/received_events","type":"User","site_admin":false},"body":"Closes #1014 \r\n\r\n<Optional Picture>\r\n\r\n## Description:\r\nIn this Pull Request we have made the following changes:\r\n\r\nAPI endpoint https://openlibrary.org/api/books?callback=func\r\nwas duplicating the callback -- `format_result()` was wrapping the result in the callback while the API was also handling the callback fn, so the results were doubled: e.g.\r\n\r\n`func(func({}););`\r\n\r\nThis PR fixes it so now it returns:\r\n\r\n`func({});`\r\n\r\nor an example with results:\r\nhttp://0.0.0.0:8080/api/books?bibkeys=OCLC%3A221499958&callback=func\r\n\r\n```func({\"OCLC:221499958\": {\"bib_key\": \"OCLC:221499958\", \"preview\": \"full\", \"preview_url\": \"https://archive.org/details/odysseybookiv00home\", \"info_url\": \"http://0.0.0.0:8080/books/OL24755423M/Odyssey_book_iv\"}});```\r\n\r\n","created_at":"2018-10-29T05:11:10Z","updated_at":"2018-10-29T14:51:15Z","closed_at":"2018-10-29T14:51:14Z","merged_at":"2018-10-29T14:51:14Z","merge_commit_sha":"ee4822c9347a715d042ce1819dcb694522557aaa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/internetarchive/openlibrary/pulls/1447/commits","review_comments_url":"https://api.github.com/repos/internetarchive/openlibrary/pulls/1447/comments","review_comment_url":"https://api.github.com/repos/internetarchive/openlibrary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/internetarchive/openlibrary/issues/1447/comments","statuses_url":"https://api.github.com/repos/internetarchive/openlibrary/statuses/763f887a1d2b95c04c4cd5c16fc4dc089836e8cc","head":{"label":"hornc:1014/hotfix/books-api-js","ref":"1014/hotfix/books-api-js","sha":"763f887a1d2b95c04c4cd5c16fc4dc089836e8cc","user":{"login":"hornc","id":905545,"node_id":"MDQ6VXNlcjkwNTU0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/905545?v=4","gravatar_id":"","url":"https://api.github.com/users/hornc","html_url":"https://github.com/hornc","followers_url":"https://api.github.com/users/hornc/followers","following_url":"https://api.github.com/users/hornc/following{/other_user}","gists_url":"https://api.github.com/users/hornc/gists{/gist_id}","starred_url":"https://api.github.com/users/hornc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornc/subscriptions","organizations_url":"https://api.github.com/users/hornc/orgs","repos_url":"https://api.github.com/users/hornc/repos","events_url":"https://api.github.com/users/hornc/events{/privacy}","received_events_url":"https://api.github.com/users/hornc/received_events","type":"User","site_admin":false},"repo":{"id":24747134,"node_id":"MDEwOlJlcG9zaXRvcnkyNDc0NzEzNA==","name":"openlibrary-1","full_name":"hornc/openlibrary-1","private":false,"owner":{"login":"hornc","id":905545,"node_id":"MDQ6VXNlcjkwNTU0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/905545?v=4","gravatar_id":"","url":"https://api.github.com/users/hornc","html_url":"https://github.com/hornc","followers_url":"https://api.github.com/users/hornc/followers","following_url":"https://api.github.com/users/hornc/following{/other_user}","gists_url":"https://api.github.com/users/hornc/gists{/gist_id}","starred_url":"https://api.github.com/users/hornc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornc/subscriptions","organizations_url":"https://api.github.com/users/hornc/orgs","repos_url":"https://api.github.com/users/hornc/repos","events_url":"https://api.github.com/users/hornc/events{/privacy}","received_events_url":"https://api.github.com/users/hornc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/hornc/openlibrary-1","description":"One webpage for every book ever published!","fork":true,"url":"https://api.github.com/repos/hornc/openlibrary-1","forks_url":"https://api.github.com/repos/hornc/openlibrary-1/forks","keys_url":"https://api.github.com/repos/hornc/openlibrary-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hornc/openlibrary-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hornc/openlibrary-1/teams","hooks_url":"https://api.github.com/repos/hornc/openlibrary-1/hooks","issue_events_url":"https://api.github.com/repos/hornc/openlibrary-1/issues/events{/number}","events_url":"https://api.github.com/repos/hornc/openlibrary-1/events","assignees_url":"https://api.github.com/repos/hornc/openlibrary-1/assignees{/user}","branches_url":"https://api.github.com/repos/hornc/openlibrary-1/branches{/branch}","tags_url":"https://api.github.com/repos/hornc/openlibrary-1/tags","blobs_url":"https://api.github.com/repos/hornc/openlibrary-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hornc/openlibrary-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hornc/openlibrary-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/hornc/openlibrary-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hornc/openlibrary-1/statuses/{sha}","languages_url":"https://api.github.com/repos/hornc/openlibrary-1/languages","stargazers_url":"https://api.github.com/repos/hornc/openlibrary-1/stargazers","contributors_url":"https://api.github.com/repos/hornc/openlibrary-1/contributors","subscribers_url":"https://api.github.com/repos/hornc/openlibrary-1/subscribers","subscription_url":"https://api.github.com/repos/hornc/openlibrary-1/subscription","commits_url":"https://api.github.com/repos/hornc/openlibrary-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/hornc/openlibrary-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/hornc/openlibrary-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/hornc/openlibrary-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/hornc/openlibrary-1/contents/{+path}","compare_url":"https://api.github.com/repos/hornc/openlibrary-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hornc/openlibrary-1/merges","archive_url":"https://api.github.com/repos/hornc/openlibrary-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hornc/openlibrary-1/downloads","issues_url":"https://api.github.com/repos/hornc/openlibrary-1/issues{/number}","pulls_url":"https://api.github.com/repos/hornc/openlibrary-1/pulls{/number}","milestones_url":"https://api.github.com/repos/hornc/openlibrary-1/milestones{/number}","notifications_url":"https://api.github.com/repos/hornc/openlibrary-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hornc/openlibrary-1/labels{/name}","releases_url":"https://api.github.com/repos/hornc/openlibrary-1/releases{/id}","deployments_url":"https://api.github.com/repos/hornc/openlibrary-1/deployments","created_at":"2014-10-03T04:49:32Z","updated_at":"2018-10-25T23:21:26Z","pushed_at":"2018-10-29T05:04:24Z","git_url":"git://github.com/hornc/openlibrary-1.git","ssh_url":"git@github.com:hornc/openlibrary-1.git","clone_url":"https://github.com/hornc/openlibrary-1.git","svn_url":"https://github.com/hornc/openlibrary-1","homepage":"https://openlibrary.org","size":43368,"stargazers_count":0,"watchers_count":0,"language":"Python","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":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"internetarchive:master","ref":"master","sha":"d638aa1df1ddde1e29025f67ee417e132e54b747","user":{"login":"internetarchive","id":130493,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDQ5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/130493?v=4","gravatar_id":"","url":"https://api.github.com/users/internetarchive","html_url":"https://github.com/internetarchive","followers_url":"https://api.github.com/users/internetarchive/followers","following_url":"https://api.github.com/users/internetarchive/following{/other_user}","gists_url":"https://api.github.com/users/internetarchive/gists{/gist_id}","starred_url":"https://api.github.com/users/internetarchive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/internetarchive/subscriptions","organizations_url":"https://api.github.com/users/internetarchive/orgs","repos_url":"https://api.github.com/users/internetarchive/repos","events_url":"https://api.github.com/users/internetarchive/events{/privacy}","received_events_url":"https://api.github.com/users/internetarchive/received_events","type":"Organization","site_admin":false},"repo":{"id":69609,"node_id":"MDEwOlJlcG9zaXRvcnk2OTYwOQ==","name":"openlibrary","full_name":"internetarchive/openlibrary","private":false,"owner":{"login":"internetarchive","id":130493,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDQ5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/130493?v=4","gravatar_id":"","url":"https://api.github.com/users/internetarchive","html_url":"https://github.com/internetarchive","followers_url":"https://api.github.com/users/internetarchive/followers","following_url":"https://api.github.com/users/internetarchive/following{/other_user}","gists_url":"https://api.github.com/users/internetarchive/gists{/gist_id}","starred_url":"https://api.github.com/users/internetarchive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/internetarchive/subscriptions","organizations_url":"https://api.github.com/users/internetarchive/orgs","repos_url":"https://api.github.com/users/internetarchive/repos","events_url":"https://api.github.com/users/internetarchive/events{/privacy}","received_events_url":"https://api.github.com/users/internetarchive/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/internetarchive/openlibrary","description":"One webpage for every book ever published!","fork":false,"url":"https://api.github.com/repos/internetarchive/openlibrary","forks_url":"https://api.github.com/repos/internetarchive/openlibrary/forks","keys_url":"https://api.github.com/repos/internetarchive/openlibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/internetarchive/openlibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/internetarchive/openlibrary/teams","hooks_url":"https://api.github.com/repos/internetarchive/openlibrary/hooks","issue_events_url":"https://api.github.com/repos/internetarchive/openlibrary/issues/events{/number}","events_url":"https://api.github.com/repos/internetarchive/openlibrary/events","assignees_url":"https://api.github.com/repos/internetarchive/openlibrary/assignees{/user}","branches_url":"https://api.github.com/repos/internetarchive/openlibrary/branches{/branch}","tags_url":"https://api.github.com/repos/internetarchive/openlibrary/tags","blobs_url":"https://api.github.com/repos/internetarchive/openlibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/internetarchive/openlibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/internetarchive/openlibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/internetarchive/openlibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/internetarchive/openlibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/internetarchive/openlibrary/languages","stargazers_url":"https://api.github.com/repos/internetarchive/openlibrary/stargazers","contributors_url":"https://api.github.com/repos/internetarchive/openlibrary/contributors","subscribers_url":"https://api.github.com/repos/internetarchive/openlibrary/subscribers","subscription_url":"https://api.github.com/repos/internetarchive/openlibrary/subscription","commits_url":"https://api.github.com/repos/internetarchive/openlibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/internetarchive/openlibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/internetarchive/openlibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/internetarchive/openlibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/internetarchive/openlibrary/contents/{+path}","compare_url":"https://api.github.com/repos/internetarchive/openlibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/internetarchive/openlibrary/merges","archive_url":"https://api.github.com/repos/internetarchive/openlibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/internetarchive/openlibrary/downloads","issues_url":"https://api.github.com/repos/internetarchive/openlibrary/issues{/number}","pulls_url":"https://api.github.com/repos/internetarchive/openlibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/internetarchive/openlibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/internetarchive/openlibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/internetarchive/openlibrary/labels{/name}","releases_url":"https://api.github.com/repos/internetarchive/openlibrary/releases{/id}","deployments_url":"https://api.github.com/repos/internetarchive/openlibrary/deployments","created_at":"2008-10-30T05:20:14Z","updated_at":"2018-10-29T14:39:06Z","pushed_at":"2018-10-29T14:51:14Z","git_url":"git://github.com/internetarchive/openlibrary.git","ssh_url":"git@github.com:internetarchive/openlibrary.git","clone_url":"https://github.com/internetarchive/openlibrary.git","svn_url":"https://github.com/internetarchive/openlibrary","homepage":"https://openlibrary.org","size":45742,"stargazers_count":1062,"watchers_count":1062,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":315,"mirror_url":null,"archived":false,"open_issues_count":397,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":315,"open_issues":397,"watchers":1062,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/internetarchive/openlibrary/pulls/1447"},"html":{"href":"https://github.com/internetarchive/openlibrary/pull/1447"},"issue":{"href":"https://api.github.com/repos/internetarchive/openlibrary/issues/1447"},"comments":{"href":"https://api.github.com/repos/internetarchive/openlibrary/issues/1447/comments"},"review_comments":{"href":"https://api.github.com/repos/internetarchive/openlibrary/pulls/1447/comments"},"review_comment":{"href":"https://api.github.com/repos/internetarchive/openlibrary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/internetarchive/openlibrary/pulls/1447/commits"},"statuses":{"href":"https://api.github.com/repos/internetarchive/openlibrary/statuses/763f887a1d2b95c04c4cd5c16fc4dc089836e8cc"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"mekarpeles","id":978325,"node_id":"MDQ6VXNlcjk3ODMyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/978325?v=4","gravatar_id":"","url":"https://api.github.com/users/mekarpeles","html_url":"https://github.com/mekarpeles","followers_url":"https://api.github.com/users/mekarpeles/followers","following_url":"https://api.github.com/users/mekarpeles/following{/other_user}","gists_url":"https://api.github.com/users/mekarpeles/gists{/gist_id}","starred_url":"https://api.github.com/users/mekarpeles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mekarpeles/subscriptions","organizations_url":"https://api.github.com/users/mekarpeles/orgs","repos_url":"https://api.github.com/users/mekarpeles/repos","events_url":"https://api.github.com/users/mekarpeles/events{/privacy}","received_events_url":"https://api.github.com/users/mekarpeles/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":4,"deletions":4,"changed_files":2}}
{"actor":{"display_login":"mekarpeles"}}