{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/tanepiper/node-bitly/pulls/11","id":44876351,"html_url":"https://github.com/tanepiper/node-bitly/pull/11","diff_url":"https://github.com/tanepiper/node-bitly/pull/11.diff","patch_url":"https://github.com/tanepiper/node-bitly/pull/11.patch","issue_url":"https://api.github.com/repos/tanepiper/node-bitly/issues/11","number":11,"state":"open","locked":false,"title":"Switch to Oauth, implement link_edit, refactor tests, use fixtures","user":{"login":"Coaxial","id":2927869,"avatar_url":"https://avatars.githubusercontent.com/u/2927869?v=3","gravatar_id":"","url":"https://api.github.com/users/Coaxial","html_url":"https://github.com/Coaxial","followers_url":"https://api.github.com/users/Coaxial/followers","following_url":"https://api.github.com/users/Coaxial/following{/other_user}","gists_url":"https://api.github.com/users/Coaxial/gists{/gist_id}","starred_url":"https://api.github.com/users/Coaxial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coaxial/subscriptions","organizations_url":"https://api.github.com/users/Coaxial/orgs","repos_url":"https://api.github.com/users/Coaxial/repos","events_url":"https://api.github.com/users/Coaxial/events{/privacy}","received_events_url":"https://api.github.com/users/Coaxial/received_events","type":"User","site_admin":false},"body":"A few improvements to the module:\r\n\r\n- Switch to OAuth: the api_key method has been deprecated and some endpoints aren't compatible with it anymore. All the older endpoints that haven't been deprecated work with an access_token so it makes sense to switch IMHO.\r\n\r\n- Implement link_edit: this endpoint couldn't be implemented with api_key since it only works with access_token. Now that api_key has been removed from the code base, it isn't a blocker anymore.\r\n\r\n- Refactor tests: small refactor involving the use of constants to loosen coupling. I had to create a new account to get an access_token since I don't have access to the one @tanepiper used to write the tests. I switched the test domain to `example.com` because it is less likely to become invalid, ever whereas tanepiper.com might not get renewed in the future. Same thing for the `SHORT_URL` and `BITLY_HASH`, I used new values relating to `example.com`.\r\n\r\n- Use fixtures: dramatically speeds up tests (went from 9000ms to 250ms on my machine), ensures consistency between runs since the exact same data will be returned from the API calls every time. I edited the `test` task so that `npm test` runs in cache mode (i.e. it uses fixtures if it can find any, makes a new recording otherwise).\r\n\r\nLMK your thoughts","created_at":"2015-09-13T17:03:32Z","updated_at":"2015-09-13T17:03:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tanepiper/node-bitly/pulls/11/commits","review_comments_url":"https://api.github.com/repos/tanepiper/node-bitly/pulls/11/comments","review_comment_url":"https://api.github.com/repos/tanepiper/node-bitly/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tanepiper/node-bitly/issues/11/comments","statuses_url":"https://api.github.com/repos/tanepiper/node-bitly/statuses/39316448806a008b14f1de22d2764f61cd657d21","head":{"label":"Coaxial:link_edit","ref":"link_edit","sha":"39316448806a008b14f1de22d2764f61cd657d21","user":{"login":"Coaxial","id":2927869,"avatar_url":"https://avatars.githubusercontent.com/u/2927869?v=3","gravatar_id":"","url":"https://api.github.com/users/Coaxial","html_url":"https://github.com/Coaxial","followers_url":"https://api.github.com/users/Coaxial/followers","following_url":"https://api.github.com/users/Coaxial/following{/other_user}","gists_url":"https://api.github.com/users/Coaxial/gists{/gist_id}","starred_url":"https://api.github.com/users/Coaxial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coaxial/subscriptions","organizations_url":"https://api.github.com/users/Coaxial/orgs","repos_url":"https://api.github.com/users/Coaxial/repos","events_url":"https://api.github.com/users/Coaxial/events{/privacy}","received_events_url":"https://api.github.com/users/Coaxial/received_events","type":"User","site_admin":false},"repo":{"id":42375680,"name":"node-bitly","full_name":"Coaxial/node-bitly","owner":{"login":"Coaxial","id":2927869,"avatar_url":"https://avatars.githubusercontent.com/u/2927869?v=3","gravatar_id":"","url":"https://api.github.com/users/Coaxial","html_url":"https://github.com/Coaxial","followers_url":"https://api.github.com/users/Coaxial/followers","following_url":"https://api.github.com/users/Coaxial/following{/other_user}","gists_url":"https://api.github.com/users/Coaxial/gists{/gist_id}","starred_url":"https://api.github.com/users/Coaxial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coaxial/subscriptions","organizations_url":"https://api.github.com/users/Coaxial/orgs","repos_url":"https://api.github.com/users/Coaxial/repos","events_url":"https://api.github.com/users/Coaxial/events{/privacy}","received_events_url":"https://api.github.com/users/Coaxial/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Coaxial/node-bitly","description":"A Bit.ly library for node.js","fork":true,"url":"https://api.github.com/repos/Coaxial/node-bitly","forks_url":"https://api.github.com/repos/Coaxial/node-bitly/forks","keys_url":"https://api.github.com/repos/Coaxial/node-bitly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coaxial/node-bitly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coaxial/node-bitly/teams","hooks_url":"https://api.github.com/repos/Coaxial/node-bitly/hooks","issue_events_url":"https://api.github.com/repos/Coaxial/node-bitly/issues/events{/number}","events_url":"https://api.github.com/repos/Coaxial/node-bitly/events","assignees_url":"https://api.github.com/repos/Coaxial/node-bitly/assignees{/user}","branches_url":"https://api.github.com/repos/Coaxial/node-bitly/branches{/branch}","tags_url":"https://api.github.com/repos/Coaxial/node-bitly/tags","blobs_url":"https://api.github.com/repos/Coaxial/node-bitly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coaxial/node-bitly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coaxial/node-bitly/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coaxial/node-bitly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coaxial/node-bitly/statuses/{sha}","languages_url":"https://api.github.com/repos/Coaxial/node-bitly/languages","stargazers_url":"https://api.github.com/repos/Coaxial/node-bitly/stargazers","contributors_url":"https://api.github.com/repos/Coaxial/node-bitly/contributors","subscribers_url":"https://api.github.com/repos/Coaxial/node-bitly/subscribers","subscription_url":"https://api.github.com/repos/Coaxial/node-bitly/subscription","commits_url":"https://api.github.com/repos/Coaxial/node-bitly/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coaxial/node-bitly/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coaxial/node-bitly/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coaxial/node-bitly/issues/comments{/number}","contents_url":"https://api.github.com/repos/Coaxial/node-bitly/contents/{+path}","compare_url":"https://api.github.com/repos/Coaxial/node-bitly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coaxial/node-bitly/merges","archive_url":"https://api.github.com/repos/Coaxial/node-bitly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coaxial/node-bitly/downloads","issues_url":"https://api.github.com/repos/Coaxial/node-bitly/issues{/number}","pulls_url":"https://api.github.com/repos/Coaxial/node-bitly/pulls{/number}","milestones_url":"https://api.github.com/repos/Coaxial/node-bitly/milestones{/number}","notifications_url":"https://api.github.com/repos/Coaxial/node-bitly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coaxial/node-bitly/labels{/name}","releases_url":"https://api.github.com/repos/Coaxial/node-bitly/releases{/id}","created_at":"2015-09-12T22:38:36Z","updated_at":"2015-09-12T22:38:36Z","pushed_at":"2015-09-13T16:52:40Z","git_url":"git://github.com/Coaxial/node-bitly.git","ssh_url":"git@github.com:Coaxial/node-bitly.git","clone_url":"https://github.com/Coaxial/node-bitly.git","svn_url":"https://github.com/Coaxial/node-bitly","homepage":"","size":147,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"tanepiper:master","ref":"master","sha":"d3166975388a37efa4aed93e799f0c96d3190879","user":{"login":"tanepiper","id":376930,"avatar_url":"https://avatars.githubusercontent.com/u/376930?v=3","gravatar_id":"","url":"https://api.github.com/users/tanepiper","html_url":"https://github.com/tanepiper","followers_url":"https://api.github.com/users/tanepiper/followers","following_url":"https://api.github.com/users/tanepiper/following{/other_user}","gists_url":"https://api.github.com/users/tanepiper/gists{/gist_id}","starred_url":"https://api.github.com/users/tanepiper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanepiper/subscriptions","organizations_url":"https://api.github.com/users/tanepiper/orgs","repos_url":"https://api.github.com/users/tanepiper/repos","events_url":"https://api.github.com/users/tanepiper/events{/privacy}","received_events_url":"https://api.github.com/users/tanepiper/received_events","type":"User","site_admin":false},"repo":{"id":901523,"name":"node-bitly","full_name":"tanepiper/node-bitly","owner":{"login":"tanepiper","id":376930,"avatar_url":"https://avatars.githubusercontent.com/u/376930?v=3","gravatar_id":"","url":"https://api.github.com/users/tanepiper","html_url":"https://github.com/tanepiper","followers_url":"https://api.github.com/users/tanepiper/followers","following_url":"https://api.github.com/users/tanepiper/following{/other_user}","gists_url":"https://api.github.com/users/tanepiper/gists{/gist_id}","starred_url":"https://api.github.com/users/tanepiper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanepiper/subscriptions","organizations_url":"https://api.github.com/users/tanepiper/orgs","repos_url":"https://api.github.com/users/tanepiper/repos","events_url":"https://api.github.com/users/tanepiper/events{/privacy}","received_events_url":"https://api.github.com/users/tanepiper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tanepiper/node-bitly","description":"A Bit.ly library for node.js","fork":false,"url":"https://api.github.com/repos/tanepiper/node-bitly","forks_url":"https://api.github.com/repos/tanepiper/node-bitly/forks","keys_url":"https://api.github.com/repos/tanepiper/node-bitly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tanepiper/node-bitly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tanepiper/node-bitly/teams","hooks_url":"https://api.github.com/repos/tanepiper/node-bitly/hooks","issue_events_url":"https://api.github.com/repos/tanepiper/node-bitly/issues/events{/number}","events_url":"https://api.github.com/repos/tanepiper/node-bitly/events","assignees_url":"https://api.github.com/repos/tanepiper/node-bitly/assignees{/user}","branches_url":"https://api.github.com/repos/tanepiper/node-bitly/branches{/branch}","tags_url":"https://api.github.com/repos/tanepiper/node-bitly/tags","blobs_url":"https://api.github.com/repos/tanepiper/node-bitly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tanepiper/node-bitly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tanepiper/node-bitly/git/refs{/sha}","trees_url":"https://api.github.com/repos/tanepiper/node-bitly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tanepiper/node-bitly/statuses/{sha}","languages_url":"https://api.github.com/repos/tanepiper/node-bitly/languages","stargazers_url":"https://api.github.com/repos/tanepiper/node-bitly/stargazers","contributors_url":"https://api.github.com/repos/tanepiper/node-bitly/contributors","subscribers_url":"https://api.github.com/repos/tanepiper/node-bitly/subscribers","subscription_url":"https://api.github.com/repos/tanepiper/node-bitly/subscription","commits_url":"https://api.github.com/repos/tanepiper/node-bitly/commits{/sha}","git_commits_url":"https://api.github.com/repos/tanepiper/node-bitly/git/commits{/sha}","comments_url":"https://api.github.com/repos/tanepiper/node-bitly/comments{/number}","issue_comment_url":"https://api.github.com/repos/tanepiper/node-bitly/issues/comments{/number}","contents_url":"https://api.github.com/repos/tanepiper/node-bitly/contents/{+path}","compare_url":"https://api.github.com/repos/tanepiper/node-bitly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tanepiper/node-bitly/merges","archive_url":"https://api.github.com/repos/tanepiper/node-bitly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tanepiper/node-bitly/downloads","issues_url":"https://api.github.com/repos/tanepiper/node-bitly/issues{/number}","pulls_url":"https://api.github.com/repos/tanepiper/node-bitly/pulls{/number}","milestones_url":"https://api.github.com/repos/tanepiper/node-bitly/milestones{/number}","notifications_url":"https://api.github.com/repos/tanepiper/node-bitly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tanepiper/node-bitly/labels{/name}","releases_url":"https://api.github.com/repos/tanepiper/node-bitly/releases{/id}","created_at":"2010-09-10T15:11:10Z","updated_at":"2015-08-26T13:08:16Z","pushed_at":"2015-06-29T22:19:08Z","git_url":"git://github.com/tanepiper/node-bitly.git","ssh_url":"git@github.com:tanepiper/node-bitly.git","clone_url":"https://github.com/tanepiper/node-bitly.git","svn_url":"https://github.com/tanepiper/node-bitly","homepage":"","size":172,"stargazers_count":64,"watchers_count":64,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":2,"forks":11,"open_issues":2,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tanepiper/node-bitly/pulls/11"},"html":{"href":"https://github.com/tanepiper/node-bitly/pull/11"},"issue":{"href":"https://api.github.com/repos/tanepiper/node-bitly/issues/11"},"comments":{"href":"https://api.github.com/repos/tanepiper/node-bitly/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/tanepiper/node-bitly/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/tanepiper/node-bitly/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tanepiper/node-bitly/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/tanepiper/node-bitly/statuses/39316448806a008b14f1de22d2764f61cd657d21"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1106,"deletions":156,"changed_files":131}}