{"action":"created","comment":{"url":"https://api.github.com/repos/frc1418/tbapy/pulls/comments/185561024","pull_request_review_id":116975493,"id":185561024,"diff_hunk":"@@ -27,10 +26,9 @@ def __init__(self, auth_key, auth_id=None, auth_secret=None, event_key=''):\n         :param auth_secret: Your event authorization secret, obtainable at https://www.thebluealliance.com/request/apiwrite\n         :param event_key: The event key that is linked to the ID and secret provided.\n         \"\"\"\n-        self.auth_key = auth_key\n-        self.auth_id = auth_id\n         self.auth_secret = auth_secret\n         self.event_key = event_key\n+        self.session.headers.update({'X-TBA-Auth-Key': auth_key, 'X-TBA-Auth-Id': auth_id})","path":"tbapy/main.py","position":30,"original_position":24,"commit_id":"daf8f56f14da81f9a514b5b6e5f0b924d45ab7ed","original_commit_id":"47c7ffa4b0cc55951c30ef79e4bcd6a327c99943","user":{"login":"AndrewLester","id":23221268,"avatar_url":"https://avatars2.githubusercontent.com/u/23221268?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewLester","html_url":"https://github.com/AndrewLester","followers_url":"https://api.github.com/users/AndrewLester/followers","following_url":"https://api.github.com/users/AndrewLester/following{/other_user}","gists_url":"https://api.github.com/users/AndrewLester/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewLester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewLester/subscriptions","organizations_url":"https://api.github.com/users/AndrewLester/orgs","repos_url":"https://api.github.com/users/AndrewLester/repos","events_url":"https://api.github.com/users/AndrewLester/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewLester/received_events","type":"User","site_admin":false},"body":"I believe what it meant on the docs is that you can omit the Session level headers (which you set with session.headers.update) by setting the same method level header to None (e.x. in a post request with the \"headers\" keyword argument)","created_at":"2018-05-02T16:38:23Z","updated_at":"2018-05-02T16:38:23Z","html_url":"https://github.com/frc1418/tbapy/pull/29#discussion_r185561024","pull_request_url":"https://api.github.com/repos/frc1418/tbapy/pulls/29","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/frc1418/tbapy/pulls/comments/185561024"},"html":{"href":"https://github.com/frc1418/tbapy/pull/29#discussion_r185561024"},"pull_request":{"href":"https://api.github.com/repos/frc1418/tbapy/pulls/29"}},"in_reply_to_id":185382273},"pull_request":{"url":"https://api.github.com/repos/frc1418/tbapy/pulls/29","id":185113640,"html_url":"https://github.com/frc1418/tbapy/pull/29","diff_url":"https://github.com/frc1418/tbapy/pull/29.diff","patch_url":"https://github.com/frc1418/tbapy/pull/29.patch","issue_url":"https://api.github.com/repos/frc1418/tbapy/issues/29","number":29,"state":"open","locked":false,"title":"Reuse connections with a Requests Session object","user":{"login":"NikhilNarayana","id":6331403,"avatar_url":"https://avatars3.githubusercontent.com/u/6331403?v=4","gravatar_id":"","url":"https://api.github.com/users/NikhilNarayana","html_url":"https://github.com/NikhilNarayana","followers_url":"https://api.github.com/users/NikhilNarayana/followers","following_url":"https://api.github.com/users/NikhilNarayana/following{/other_user}","gists_url":"https://api.github.com/users/NikhilNarayana/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilNarayana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilNarayana/subscriptions","organizations_url":"https://api.github.com/users/NikhilNarayana/orgs","repos_url":"https://api.github.com/users/NikhilNarayana/repos","events_url":"https://api.github.com/users/NikhilNarayana/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilNarayana/received_events","type":"User","site_admin":false},"body":"Fixes #24 \r\n\r\nSwapped out the raw get and post functions for a Session object which can access all the functions normally found in requests. Headers are now assigned on instantiation of the TBA object so they don't have to specified when getting or posting.\r\n\r\nI did test this on my dev server, no issues were found.","created_at":"2018-05-01T03:29:07Z","updated_at":"2018-05-02T16:38:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ea5a0bbb3f1a6ea44496f49ca960c4b1cf6b67a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/frc1418/tbapy/pulls/29/commits","review_comments_url":"https://api.github.com/repos/frc1418/tbapy/pulls/29/comments","review_comment_url":"https://api.github.com/repos/frc1418/tbapy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frc1418/tbapy/issues/29/comments","statuses_url":"https://api.github.com/repos/frc1418/tbapy/statuses/daf8f56f14da81f9a514b5b6e5f0b924d45ab7ed","head":{"label":"NikhilNarayana:reuseConnections","ref":"reuseConnections","sha":"daf8f56f14da81f9a514b5b6e5f0b924d45ab7ed","user":{"login":"NikhilNarayana","id":6331403,"avatar_url":"https://avatars3.githubusercontent.com/u/6331403?v=4","gravatar_id":"","url":"https://api.github.com/users/NikhilNarayana","html_url":"https://github.com/NikhilNarayana","followers_url":"https://api.github.com/users/NikhilNarayana/followers","following_url":"https://api.github.com/users/NikhilNarayana/following{/other_user}","gists_url":"https://api.github.com/users/NikhilNarayana/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilNarayana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilNarayana/subscriptions","organizations_url":"https://api.github.com/users/NikhilNarayana/orgs","repos_url":"https://api.github.com/users/NikhilNarayana/repos","events_url":"https://api.github.com/users/NikhilNarayana/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilNarayana/received_events","type":"User","site_admin":false},"repo":{"id":91156186,"name":"tbapy","full_name":"NikhilNarayana/tbapy","owner":{"login":"NikhilNarayana","id":6331403,"avatar_url":"https://avatars3.githubusercontent.com/u/6331403?v=4","gravatar_id":"","url":"https://api.github.com/users/NikhilNarayana","html_url":"https://github.com/NikhilNarayana","followers_url":"https://api.github.com/users/NikhilNarayana/followers","following_url":"https://api.github.com/users/NikhilNarayana/following{/other_user}","gists_url":"https://api.github.com/users/NikhilNarayana/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilNarayana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilNarayana/subscriptions","organizations_url":"https://api.github.com/users/NikhilNarayana/orgs","repos_url":"https://api.github.com/users/NikhilNarayana/repos","events_url":"https://api.github.com/users/NikhilNarayana/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilNarayana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NikhilNarayana/tbapy","description":":chart_with_upwards_trend: Python library for fetching data from The Blue Alliance API. Now uses API v3!","fork":true,"url":"https://api.github.com/repos/NikhilNarayana/tbapy","forks_url":"https://api.github.com/repos/NikhilNarayana/tbapy/forks","keys_url":"https://api.github.com/repos/NikhilNarayana/tbapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NikhilNarayana/tbapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NikhilNarayana/tbapy/teams","hooks_url":"https://api.github.com/repos/NikhilNarayana/tbapy/hooks","issue_events_url":"https://api.github.com/repos/NikhilNarayana/tbapy/issues/events{/number}","events_url":"https://api.github.com/repos/NikhilNarayana/tbapy/events","assignees_url":"https://api.github.com/repos/NikhilNarayana/tbapy/assignees{/user}","branches_url":"https://api.github.com/repos/NikhilNarayana/tbapy/branches{/branch}","tags_url":"https://api.github.com/repos/NikhilNarayana/tbapy/tags","blobs_url":"https://api.github.com/repos/NikhilNarayana/tbapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NikhilNarayana/tbapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NikhilNarayana/tbapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/NikhilNarayana/tbapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NikhilNarayana/tbapy/statuses/{sha}","languages_url":"https://api.github.com/repos/NikhilNarayana/tbapy/languages","stargazers_url":"https://api.github.com/repos/NikhilNarayana/tbapy/stargazers","contributors_url":"https://api.github.com/repos/NikhilNarayana/tbapy/contributors","subscribers_url":"https://api.github.com/repos/NikhilNarayana/tbapy/subscribers","subscription_url":"https://api.github.com/repos/NikhilNarayana/tbapy/subscription","commits_url":"https://api.github.com/repos/NikhilNarayana/tbapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/NikhilNarayana/tbapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/NikhilNarayana/tbapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/NikhilNarayana/tbapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/NikhilNarayana/tbapy/contents/{+path}","compare_url":"https://api.github.com/repos/NikhilNarayana/tbapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NikhilNarayana/tbapy/merges","archive_url":"https://api.github.com/repos/NikhilNarayana/tbapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NikhilNarayana/tbapy/downloads","issues_url":"https://api.github.com/repos/NikhilNarayana/tbapy/issues{/number}","pulls_url":"https://api.github.com/repos/NikhilNarayana/tbapy/pulls{/number}","milestones_url":"https://api.github.com/repos/NikhilNarayana/tbapy/milestones{/number}","notifications_url":"https://api.github.com/repos/NikhilNarayana/tbapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NikhilNarayana/tbapy/labels{/name}","releases_url":"https://api.github.com/repos/NikhilNarayana/tbapy/releases{/id}","deployments_url":"https://api.github.com/repos/NikhilNarayana/tbapy/deployments","created_at":"2017-05-13T07:06:09Z","updated_at":"2018-04-30T23:08:08Z","pushed_at":"2018-05-02T03:08:37Z","git_url":"git://github.com/NikhilNarayana/tbapy.git","ssh_url":"git@github.com:NikhilNarayana/tbapy.git","clone_url":"https://github.com/NikhilNarayana/tbapy.git","svn_url":"https://github.com/NikhilNarayana/tbapy","homepage":"","size":63,"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":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"frc1418:master","ref":"master","sha":"92c259da2a9bfdbb70b83d91e5fb1b0d17564384","user":{"login":"frc1418","id":6126989,"avatar_url":"https://avatars0.githubusercontent.com/u/6126989?v=4","gravatar_id":"","url":"https://api.github.com/users/frc1418","html_url":"https://github.com/frc1418","followers_url":"https://api.github.com/users/frc1418/followers","following_url":"https://api.github.com/users/frc1418/following{/other_user}","gists_url":"https://api.github.com/users/frc1418/gists{/gist_id}","starred_url":"https://api.github.com/users/frc1418/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frc1418/subscriptions","organizations_url":"https://api.github.com/users/frc1418/orgs","repos_url":"https://api.github.com/users/frc1418/repos","events_url":"https://api.github.com/users/frc1418/events{/privacy}","received_events_url":"https://api.github.com/users/frc1418/received_events","type":"Organization","site_admin":false},"repo":{"id":81682908,"name":"tbapy","full_name":"frc1418/tbapy","owner":{"login":"frc1418","id":6126989,"avatar_url":"https://avatars0.githubusercontent.com/u/6126989?v=4","gravatar_id":"","url":"https://api.github.com/users/frc1418","html_url":"https://github.com/frc1418","followers_url":"https://api.github.com/users/frc1418/followers","following_url":"https://api.github.com/users/frc1418/following{/other_user}","gists_url":"https://api.github.com/users/frc1418/gists{/gist_id}","starred_url":"https://api.github.com/users/frc1418/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frc1418/subscriptions","organizations_url":"https://api.github.com/users/frc1418/orgs","repos_url":"https://api.github.com/users/frc1418/repos","events_url":"https://api.github.com/users/frc1418/events{/privacy}","received_events_url":"https://api.github.com/users/frc1418/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/frc1418/tbapy","description":":chart_with_upwards_trend: Python library for fetching data from The Blue Alliance API (v3).","fork":false,"url":"https://api.github.com/repos/frc1418/tbapy","forks_url":"https://api.github.com/repos/frc1418/tbapy/forks","keys_url":"https://api.github.com/repos/frc1418/tbapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frc1418/tbapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frc1418/tbapy/teams","hooks_url":"https://api.github.com/repos/frc1418/tbapy/hooks","issue_events_url":"https://api.github.com/repos/frc1418/tbapy/issues/events{/number}","events_url":"https://api.github.com/repos/frc1418/tbapy/events","assignees_url":"https://api.github.com/repos/frc1418/tbapy/assignees{/user}","branches_url":"https://api.github.com/repos/frc1418/tbapy/branches{/branch}","tags_url":"https://api.github.com/repos/frc1418/tbapy/tags","blobs_url":"https://api.github.com/repos/frc1418/tbapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frc1418/tbapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frc1418/tbapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/frc1418/tbapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frc1418/tbapy/statuses/{sha}","languages_url":"https://api.github.com/repos/frc1418/tbapy/languages","stargazers_url":"https://api.github.com/repos/frc1418/tbapy/stargazers","contributors_url":"https://api.github.com/repos/frc1418/tbapy/contributors","subscribers_url":"https://api.github.com/repos/frc1418/tbapy/subscribers","subscription_url":"https://api.github.com/repos/frc1418/tbapy/subscription","commits_url":"https://api.github.com/repos/frc1418/tbapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/frc1418/tbapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/frc1418/tbapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/frc1418/tbapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/frc1418/tbapy/contents/{+path}","compare_url":"https://api.github.com/repos/frc1418/tbapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frc1418/tbapy/merges","archive_url":"https://api.github.com/repos/frc1418/tbapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frc1418/tbapy/downloads","issues_url":"https://api.github.com/repos/frc1418/tbapy/issues{/number}","pulls_url":"https://api.github.com/repos/frc1418/tbapy/pulls{/number}","milestones_url":"https://api.github.com/repos/frc1418/tbapy/milestones{/number}","notifications_url":"https://api.github.com/repos/frc1418/tbapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frc1418/tbapy/labels{/name}","releases_url":"https://api.github.com/repos/frc1418/tbapy/releases{/id}","deployments_url":"https://api.github.com/repos/frc1418/tbapy/deployments","created_at":"2017-02-11T21:16:33Z","updated_at":"2018-04-30T22:34:15Z","pushed_at":"2018-05-02T03:08:37Z","git_url":"git://github.com/frc1418/tbapy.git","ssh_url":"git@github.com:frc1418/tbapy.git","clone_url":"https://github.com/frc1418/tbapy.git","svn_url":"https://github.com/frc1418/tbapy","homepage":"","size":61,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":13,"open_issues":3,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/frc1418/tbapy/pulls/29"},"html":{"href":"https://github.com/frc1418/tbapy/pull/29"},"issue":{"href":"https://api.github.com/repos/frc1418/tbapy/issues/29"},"comments":{"href":"https://api.github.com/repos/frc1418/tbapy/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/frc1418/tbapy/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/frc1418/tbapy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frc1418/tbapy/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/frc1418/tbapy/statuses/daf8f56f14da81f9a514b5b6e5f0b924d45ab7ed"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AndrewLester"}}