{"action":"closed","number":93,"pull_request":{"url":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/93","id":36875007,"html_url":"https://github.com/desmondmorris/node-twitter/pull/93","diff_url":"https://github.com/desmondmorris/node-twitter/pull/93.diff","patch_url":"https://github.com/desmondmorris/node-twitter/pull/93.patch","issue_url":"https://api.github.com/repos/desmondmorris/node-twitter/issues/93","number":93,"state":"closed","locked":false,"title":"Added apllication-only authetication option","user":{"login":"gazzer82","id":1923535,"avatar_url":"https://avatars.githubusercontent.com/u/1923535?v=3","gravatar_id":"","url":"https://api.github.com/users/gazzer82","html_url":"https://github.com/gazzer82","followers_url":"https://api.github.com/users/gazzer82/followers","following_url":"https://api.github.com/users/gazzer82/following{/other_user}","gists_url":"https://api.github.com/users/gazzer82/gists{/gist_id}","starred_url":"https://api.github.com/users/gazzer82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gazzer82/subscriptions","organizations_url":"https://api.github.com/users/gazzer82/orgs","repos_url":"https://api.github.com/users/gazzer82/repos","events_url":"https://api.github.com/users/gazzer82/events{/privacy}","received_events_url":"https://api.github.com/users/gazzer82/received_events","type":"User","site_admin":false},"body":"Ok this is my first Pull Request, and i'm also pretty new at Javascript so apologies for anything that's incorrect!\r\n\r\nI needed application-only authentication for an application i am creating to access the higher rate limits and couldn't find anything up to date that did it so this i an attempt at that.\r\n\r\nAll i have done is added some functions that looks to see if the user tokens are specified when the twitter object is created, if not it looks for a bearer token. If it finds a bearer token is adds it to the header and authenticates that way.\r\n\r\nThe user still needs to actually generate the token externally just as they would with the user token.\r\n\r\nTested and seems to be working for me.","created_at":"2015-06-03T20:36:05Z","updated_at":"2015-06-03T20:49:04Z","closed_at":"2015-06-03T20:49:04Z","merged_at":null,"merge_commit_sha":"0061924d66fdc24ed3b69b9dad226c11fee246b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/93/commits","review_comments_url":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/93/comments","review_comment_url":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/desmondmorris/node-twitter/issues/93/comments","statuses_url":"https://api.github.com/repos/desmondmorris/node-twitter/statuses/27fd81f2c1b41e53d4f48d67abe649a2c8c8da9f","head":{"label":"gazzer82:master","ref":"master","sha":"27fd81f2c1b41e53d4f48d67abe649a2c8c8da9f","user":{"login":"gazzer82","id":1923535,"avatar_url":"https://avatars.githubusercontent.com/u/1923535?v=3","gravatar_id":"","url":"https://api.github.com/users/gazzer82","html_url":"https://github.com/gazzer82","followers_url":"https://api.github.com/users/gazzer82/followers","following_url":"https://api.github.com/users/gazzer82/following{/other_user}","gists_url":"https://api.github.com/users/gazzer82/gists{/gist_id}","starred_url":"https://api.github.com/users/gazzer82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gazzer82/subscriptions","organizations_url":"https://api.github.com/users/gazzer82/orgs","repos_url":"https://api.github.com/users/gazzer82/repos","events_url":"https://api.github.com/users/gazzer82/events{/privacy}","received_events_url":"https://api.github.com/users/gazzer82/received_events","type":"User","site_admin":false},"repo":{"id":36818954,"name":"node-twitter","full_name":"gazzer82/node-twitter","owner":{"login":"gazzer82","id":1923535,"avatar_url":"https://avatars.githubusercontent.com/u/1923535?v=3","gravatar_id":"","url":"https://api.github.com/users/gazzer82","html_url":"https://github.com/gazzer82","followers_url":"https://api.github.com/users/gazzer82/followers","following_url":"https://api.github.com/users/gazzer82/following{/other_user}","gists_url":"https://api.github.com/users/gazzer82/gists{/gist_id}","starred_url":"https://api.github.com/users/gazzer82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gazzer82/subscriptions","organizations_url":"https://api.github.com/users/gazzer82/orgs","repos_url":"https://api.github.com/users/gazzer82/repos","events_url":"https://api.github.com/users/gazzer82/events{/privacy}","received_events_url":"https://api.github.com/users/gazzer82/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gazzer82/node-twitter","description":"An asynchronous client library for the Twitter REST and Streaming API's.","fork":true,"url":"https://api.github.com/repos/gazzer82/node-twitter","forks_url":"https://api.github.com/repos/gazzer82/node-twitter/forks","keys_url":"https://api.github.com/repos/gazzer82/node-twitter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gazzer82/node-twitter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gazzer82/node-twitter/teams","hooks_url":"https://api.github.com/repos/gazzer82/node-twitter/hooks","issue_events_url":"https://api.github.com/repos/gazzer82/node-twitter/issues/events{/number}","events_url":"https://api.github.com/repos/gazzer82/node-twitter/events","assignees_url":"https://api.github.com/repos/gazzer82/node-twitter/assignees{/user}","branches_url":"https://api.github.com/repos/gazzer82/node-twitter/branches{/branch}","tags_url":"https://api.github.com/repos/gazzer82/node-twitter/tags","blobs_url":"https://api.github.com/repos/gazzer82/node-twitter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gazzer82/node-twitter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gazzer82/node-twitter/git/refs{/sha}","trees_url":"https://api.github.com/repos/gazzer82/node-twitter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gazzer82/node-twitter/statuses/{sha}","languages_url":"https://api.github.com/repos/gazzer82/node-twitter/languages","stargazers_url":"https://api.github.com/repos/gazzer82/node-twitter/stargazers","contributors_url":"https://api.github.com/repos/gazzer82/node-twitter/contributors","subscribers_url":"https://api.github.com/repos/gazzer82/node-twitter/subscribers","subscription_url":"https://api.github.com/repos/gazzer82/node-twitter/subscription","commits_url":"https://api.github.com/repos/gazzer82/node-twitter/commits{/sha}","git_commits_url":"https://api.github.com/repos/gazzer82/node-twitter/git/commits{/sha}","comments_url":"https://api.github.com/repos/gazzer82/node-twitter/comments{/number}","issue_comment_url":"https://api.github.com/repos/gazzer82/node-twitter/issues/comments{/number}","contents_url":"https://api.github.com/repos/gazzer82/node-twitter/contents/{+path}","compare_url":"https://api.github.com/repos/gazzer82/node-twitter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gazzer82/node-twitter/merges","archive_url":"https://api.github.com/repos/gazzer82/node-twitter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gazzer82/node-twitter/downloads","issues_url":"https://api.github.com/repos/gazzer82/node-twitter/issues{/number}","pulls_url":"https://api.github.com/repos/gazzer82/node-twitter/pulls{/number}","milestones_url":"https://api.github.com/repos/gazzer82/node-twitter/milestones{/number}","notifications_url":"https://api.github.com/repos/gazzer82/node-twitter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gazzer82/node-twitter/labels{/name}","releases_url":"https://api.github.com/repos/gazzer82/node-twitter/releases{/id}","created_at":"2015-06-03T17:21:56Z","updated_at":"2015-06-03T17:21:57Z","pushed_at":"2015-06-03T20:30:38Z","git_url":"git://github.com/gazzer82/node-twitter.git","ssh_url":"git@github.com:gazzer82/node-twitter.git","clone_url":"https://github.com/gazzer82/node-twitter.git","svn_url":"https://github.com/gazzer82/node-twitter","homepage":"https://www.npmjs.com/package/twitter","size":1574,"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":"desmondmorris:master","ref":"master","sha":"0b69ff077aba3816ef602eb698e3dc9a81653b17","user":{"login":"desmondmorris","id":129360,"avatar_url":"https://avatars.githubusercontent.com/u/129360?v=3","gravatar_id":"","url":"https://api.github.com/users/desmondmorris","html_url":"https://github.com/desmondmorris","followers_url":"https://api.github.com/users/desmondmorris/followers","following_url":"https://api.github.com/users/desmondmorris/following{/other_user}","gists_url":"https://api.github.com/users/desmondmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/desmondmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desmondmorris/subscriptions","organizations_url":"https://api.github.com/users/desmondmorris/orgs","repos_url":"https://api.github.com/users/desmondmorris/repos","events_url":"https://api.github.com/users/desmondmorris/events{/privacy}","received_events_url":"https://api.github.com/users/desmondmorris/received_events","type":"User","site_admin":false},"repo":{"id":10469346,"name":"node-twitter","full_name":"desmondmorris/node-twitter","owner":{"login":"desmondmorris","id":129360,"avatar_url":"https://avatars.githubusercontent.com/u/129360?v=3","gravatar_id":"","url":"https://api.github.com/users/desmondmorris","html_url":"https://github.com/desmondmorris","followers_url":"https://api.github.com/users/desmondmorris/followers","following_url":"https://api.github.com/users/desmondmorris/following{/other_user}","gists_url":"https://api.github.com/users/desmondmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/desmondmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desmondmorris/subscriptions","organizations_url":"https://api.github.com/users/desmondmorris/orgs","repos_url":"https://api.github.com/users/desmondmorris/repos","events_url":"https://api.github.com/users/desmondmorris/events{/privacy}","received_events_url":"https://api.github.com/users/desmondmorris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/desmondmorris/node-twitter","description":"An asynchronous client library for the Twitter REST and Streaming API's.","fork":true,"url":"https://api.github.com/repos/desmondmorris/node-twitter","forks_url":"https://api.github.com/repos/desmondmorris/node-twitter/forks","keys_url":"https://api.github.com/repos/desmondmorris/node-twitter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/desmondmorris/node-twitter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/desmondmorris/node-twitter/teams","hooks_url":"https://api.github.com/repos/desmondmorris/node-twitter/hooks","issue_events_url":"https://api.github.com/repos/desmondmorris/node-twitter/issues/events{/number}","events_url":"https://api.github.com/repos/desmondmorris/node-twitter/events","assignees_url":"https://api.github.com/repos/desmondmorris/node-twitter/assignees{/user}","branches_url":"https://api.github.com/repos/desmondmorris/node-twitter/branches{/branch}","tags_url":"https://api.github.com/repos/desmondmorris/node-twitter/tags","blobs_url":"https://api.github.com/repos/desmondmorris/node-twitter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/desmondmorris/node-twitter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/desmondmorris/node-twitter/git/refs{/sha}","trees_url":"https://api.github.com/repos/desmondmorris/node-twitter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/desmondmorris/node-twitter/statuses/{sha}","languages_url":"https://api.github.com/repos/desmondmorris/node-twitter/languages","stargazers_url":"https://api.github.com/repos/desmondmorris/node-twitter/stargazers","contributors_url":"https://api.github.com/repos/desmondmorris/node-twitter/contributors","subscribers_url":"https://api.github.com/repos/desmondmorris/node-twitter/subscribers","subscription_url":"https://api.github.com/repos/desmondmorris/node-twitter/subscription","commits_url":"https://api.github.com/repos/desmondmorris/node-twitter/commits{/sha}","git_commits_url":"https://api.github.com/repos/desmondmorris/node-twitter/git/commits{/sha}","comments_url":"https://api.github.com/repos/desmondmorris/node-twitter/comments{/number}","issue_comment_url":"https://api.github.com/repos/desmondmorris/node-twitter/issues/comments{/number}","contents_url":"https://api.github.com/repos/desmondmorris/node-twitter/contents/{+path}","compare_url":"https://api.github.com/repos/desmondmorris/node-twitter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/desmondmorris/node-twitter/merges","archive_url":"https://api.github.com/repos/desmondmorris/node-twitter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/desmondmorris/node-twitter/downloads","issues_url":"https://api.github.com/repos/desmondmorris/node-twitter/issues{/number}","pulls_url":"https://api.github.com/repos/desmondmorris/node-twitter/pulls{/number}","milestones_url":"https://api.github.com/repos/desmondmorris/node-twitter/milestones{/number}","notifications_url":"https://api.github.com/repos/desmondmorris/node-twitter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/desmondmorris/node-twitter/labels{/name}","releases_url":"https://api.github.com/repos/desmondmorris/node-twitter/releases{/id}","created_at":"2013-06-04T02:26:00Z","updated_at":"2015-06-03T17:13:17Z","pushed_at":"2015-06-03T20:36:05Z","git_url":"git://github.com/desmondmorris/node-twitter.git","ssh_url":"git@github.com:desmondmorris/node-twitter.git","clone_url":"https://github.com/desmondmorris/node-twitter.git","svn_url":"https://github.com/desmondmorris/node-twitter","homepage":"https://www.npmjs.com/package/twitter","size":1574,"stargazers_count":234,"watchers_count":234,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"open_issues_count":20,"forks":73,"open_issues":20,"watchers":234,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/93"},"html":{"href":"https://github.com/desmondmorris/node-twitter/pull/93"},"issue":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/issues/93"},"comments":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/desmondmorris/node-twitter/statuses/27fd81f2c1b41e53d4f48d67abe649a2c8c8da9f"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":65,"deletions":16,"changed_files":2}}