{"action":"created","comment":{"url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/comments/70618187","id":70618187,"diff_hunk":"@@ -0,0 +1,126 @@\n+class GoogleCalendarService\n+  def initialize(oauth_token, refresh_token)\n+    @client = Google::APIClient.new(:auto_refresh_token => true)\n+    @client.authorization.access_token = oauth_token\n+    @client.authorization.refresh_token = refresh_token\n+    @client.authorization.client_id = ENV[\"GOOGLE_CLIENT_ID\"]\n+    @client.authorization.client_secret = ENV[\"GOOGLE_SECRET\"]\n+    if @client.authorization.refresh_token && @client.authorization.expired?\n+      @client.authorization.fetch_access_token!\n+    end\n+    return @client\n+  end\n+\n+  def list_calendars\n+    @client.execute(api_method: service.calendar_list.list,","path":"app/services/google_calendar_service.rb","position":15,"original_position":15,"commit_id":"b2b89edb573424efea00a65b0cff37cdf636ce88","original_commit_id":"b2b89edb573424efea00a65b0cff37cdf636ce88","user":{"login":"HarshwardhanSingh","id":6086557,"avatar_url":"https://avatars.githubusercontent.com/u/6086557?v=3","gravatar_id":"","url":"https://api.github.com/users/HarshwardhanSingh","html_url":"https://github.com/HarshwardhanSingh","followers_url":"https://api.github.com/users/HarshwardhanSingh/followers","following_url":"https://api.github.com/users/HarshwardhanSingh/following{/other_user}","gists_url":"https://api.github.com/users/HarshwardhanSingh/gists{/gist_id}","starred_url":"https://api.github.com/users/HarshwardhanSingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarshwardhanSingh/subscriptions","organizations_url":"https://api.github.com/users/HarshwardhanSingh/orgs","repos_url":"https://api.github.com/users/HarshwardhanSingh/repos","events_url":"https://api.github.com/users/HarshwardhanSingh/events{/privacy}","received_events_url":"https://api.github.com/users/HarshwardhanSingh/received_events","type":"User","site_admin":false},"body":"didn't get you.","created_at":"2016-07-13T12:50:11Z","updated_at":"2016-07-13T12:50:11Z","html_url":"https://github.com/code-mancers/leave-tracker/pull/17#discussion_r70618187","pull_request_url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/comments/70618187"},"html":{"href":"https://github.com/code-mancers/leave-tracker/pull/17#discussion_r70618187"},"pull_request":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17","id":76747333,"html_url":"https://github.com/code-mancers/leave-tracker/pull/17","diff_url":"https://github.com/code-mancers/leave-tracker/pull/17.diff","patch_url":"https://github.com/code-mancers/leave-tracker/pull/17.patch","issue_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues/17","number":17,"state":"open","locked":false,"title":"Refactoring leaves and calendar controllers","user":{"login":"HarshwardhanSingh","id":6086557,"avatar_url":"https://avatars.githubusercontent.com/u/6086557?v=3","gravatar_id":"","url":"https://api.github.com/users/HarshwardhanSingh","html_url":"https://github.com/HarshwardhanSingh","followers_url":"https://api.github.com/users/HarshwardhanSingh/followers","following_url":"https://api.github.com/users/HarshwardhanSingh/following{/other_user}","gists_url":"https://api.github.com/users/HarshwardhanSingh/gists{/gist_id}","starred_url":"https://api.github.com/users/HarshwardhanSingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarshwardhanSingh/subscriptions","organizations_url":"https://api.github.com/users/HarshwardhanSingh/orgs","repos_url":"https://api.github.com/users/HarshwardhanSingh/repos","events_url":"https://api.github.com/users/HarshwardhanSingh/events{/privacy}","received_events_url":"https://api.github.com/users/HarshwardhanSingh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-08T12:47:15Z","updated_at":"2016-07-13T12:50:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e0afb7a4f9ea294149fd930feda35fd7fb841bc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17/commits","review_comments_url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17/comments","review_comment_url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues/17/comments","statuses_url":"https://api.github.com/repos/code-mancers/leave-tracker/statuses/b2b89edb573424efea00a65b0cff37cdf636ce88","head":{"label":"code-mancers:refactoring_leaves_controller","ref":"refactoring_leaves_controller","sha":"b2b89edb573424efea00a65b0cff37cdf636ce88","user":{"login":"code-mancers","id":1137275,"avatar_url":"https://avatars.githubusercontent.com/u/1137275?v=3","gravatar_id":"","url":"https://api.github.com/users/code-mancers","html_url":"https://github.com/code-mancers","followers_url":"https://api.github.com/users/code-mancers/followers","following_url":"https://api.github.com/users/code-mancers/following{/other_user}","gists_url":"https://api.github.com/users/code-mancers/gists{/gist_id}","starred_url":"https://api.github.com/users/code-mancers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-mancers/subscriptions","organizations_url":"https://api.github.com/users/code-mancers/orgs","repos_url":"https://api.github.com/users/code-mancers/repos","events_url":"https://api.github.com/users/code-mancers/events{/privacy}","received_events_url":"https://api.github.com/users/code-mancers/received_events","type":"Organization","site_admin":false},"repo":{"id":61518242,"name":"leave-tracker","full_name":"code-mancers/leave-tracker","owner":{"login":"code-mancers","id":1137275,"avatar_url":"https://avatars.githubusercontent.com/u/1137275?v=3","gravatar_id":"","url":"https://api.github.com/users/code-mancers","html_url":"https://github.com/code-mancers","followers_url":"https://api.github.com/users/code-mancers/followers","following_url":"https://api.github.com/users/code-mancers/following{/other_user}","gists_url":"https://api.github.com/users/code-mancers/gists{/gist_id}","starred_url":"https://api.github.com/users/code-mancers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-mancers/subscriptions","organizations_url":"https://api.github.com/users/code-mancers/orgs","repos_url":"https://api.github.com/users/code-mancers/repos","events_url":"https://api.github.com/users/code-mancers/events{/privacy}","received_events_url":"https://api.github.com/users/code-mancers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-mancers/leave-tracker","description":"","fork":false,"url":"https://api.github.com/repos/code-mancers/leave-tracker","forks_url":"https://api.github.com/repos/code-mancers/leave-tracker/forks","keys_url":"https://api.github.com/repos/code-mancers/leave-tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-mancers/leave-tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-mancers/leave-tracker/teams","hooks_url":"https://api.github.com/repos/code-mancers/leave-tracker/hooks","issue_events_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues/events{/number}","events_url":"https://api.github.com/repos/code-mancers/leave-tracker/events","assignees_url":"https://api.github.com/repos/code-mancers/leave-tracker/assignees{/user}","branches_url":"https://api.github.com/repos/code-mancers/leave-tracker/branches{/branch}","tags_url":"https://api.github.com/repos/code-mancers/leave-tracker/tags","blobs_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-mancers/leave-tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/code-mancers/leave-tracker/languages","stargazers_url":"https://api.github.com/repos/code-mancers/leave-tracker/stargazers","contributors_url":"https://api.github.com/repos/code-mancers/leave-tracker/contributors","subscribers_url":"https://api.github.com/repos/code-mancers/leave-tracker/subscribers","subscription_url":"https://api.github.com/repos/code-mancers/leave-tracker/subscription","commits_url":"https://api.github.com/repos/code-mancers/leave-tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-mancers/leave-tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-mancers/leave-tracker/contents/{+path}","compare_url":"https://api.github.com/repos/code-mancers/leave-tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-mancers/leave-tracker/merges","archive_url":"https://api.github.com/repos/code-mancers/leave-tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-mancers/leave-tracker/downloads","issues_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues{/number}","pulls_url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/code-mancers/leave-tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/code-mancers/leave-tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-mancers/leave-tracker/labels{/name}","releases_url":"https://api.github.com/repos/code-mancers/leave-tracker/releases{/id}","deployments_url":"https://api.github.com/repos/code-mancers/leave-tracker/deployments","created_at":"2016-06-20T05:04:39Z","updated_at":"2016-06-20T07:02:28Z","pushed_at":"2016-07-13T11:48:37Z","git_url":"git://github.com/code-mancers/leave-tracker.git","ssh_url":"git@github.com:code-mancers/leave-tracker.git","clone_url":"https://github.com/code-mancers/leave-tracker.git","svn_url":"https://github.com/code-mancers/leave-tracker","homepage":null,"size":296,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"code-mancers:refactoring_calendars_controller","ref":"refactoring_calendars_controller","sha":"0918eb13ff2c74cd4e0b5510f66a3441dcd99b1a","user":{"login":"code-mancers","id":1137275,"avatar_url":"https://avatars.githubusercontent.com/u/1137275?v=3","gravatar_id":"","url":"https://api.github.com/users/code-mancers","html_url":"https://github.com/code-mancers","followers_url":"https://api.github.com/users/code-mancers/followers","following_url":"https://api.github.com/users/code-mancers/following{/other_user}","gists_url":"https://api.github.com/users/code-mancers/gists{/gist_id}","starred_url":"https://api.github.com/users/code-mancers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-mancers/subscriptions","organizations_url":"https://api.github.com/users/code-mancers/orgs","repos_url":"https://api.github.com/users/code-mancers/repos","events_url":"https://api.github.com/users/code-mancers/events{/privacy}","received_events_url":"https://api.github.com/users/code-mancers/received_events","type":"Organization","site_admin":false},"repo":{"id":61518242,"name":"leave-tracker","full_name":"code-mancers/leave-tracker","owner":{"login":"code-mancers","id":1137275,"avatar_url":"https://avatars.githubusercontent.com/u/1137275?v=3","gravatar_id":"","url":"https://api.github.com/users/code-mancers","html_url":"https://github.com/code-mancers","followers_url":"https://api.github.com/users/code-mancers/followers","following_url":"https://api.github.com/users/code-mancers/following{/other_user}","gists_url":"https://api.github.com/users/code-mancers/gists{/gist_id}","starred_url":"https://api.github.com/users/code-mancers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-mancers/subscriptions","organizations_url":"https://api.github.com/users/code-mancers/orgs","repos_url":"https://api.github.com/users/code-mancers/repos","events_url":"https://api.github.com/users/code-mancers/events{/privacy}","received_events_url":"https://api.github.com/users/code-mancers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-mancers/leave-tracker","description":"","fork":false,"url":"https://api.github.com/repos/code-mancers/leave-tracker","forks_url":"https://api.github.com/repos/code-mancers/leave-tracker/forks","keys_url":"https://api.github.com/repos/code-mancers/leave-tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-mancers/leave-tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-mancers/leave-tracker/teams","hooks_url":"https://api.github.com/repos/code-mancers/leave-tracker/hooks","issue_events_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues/events{/number}","events_url":"https://api.github.com/repos/code-mancers/leave-tracker/events","assignees_url":"https://api.github.com/repos/code-mancers/leave-tracker/assignees{/user}","branches_url":"https://api.github.com/repos/code-mancers/leave-tracker/branches{/branch}","tags_url":"https://api.github.com/repos/code-mancers/leave-tracker/tags","blobs_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-mancers/leave-tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/code-mancers/leave-tracker/languages","stargazers_url":"https://api.github.com/repos/code-mancers/leave-tracker/stargazers","contributors_url":"https://api.github.com/repos/code-mancers/leave-tracker/contributors","subscribers_url":"https://api.github.com/repos/code-mancers/leave-tracker/subscribers","subscription_url":"https://api.github.com/repos/code-mancers/leave-tracker/subscription","commits_url":"https://api.github.com/repos/code-mancers/leave-tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-mancers/leave-tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-mancers/leave-tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-mancers/leave-tracker/contents/{+path}","compare_url":"https://api.github.com/repos/code-mancers/leave-tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-mancers/leave-tracker/merges","archive_url":"https://api.github.com/repos/code-mancers/leave-tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-mancers/leave-tracker/downloads","issues_url":"https://api.github.com/repos/code-mancers/leave-tracker/issues{/number}","pulls_url":"https://api.github.com/repos/code-mancers/leave-tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/code-mancers/leave-tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/code-mancers/leave-tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-mancers/leave-tracker/labels{/name}","releases_url":"https://api.github.com/repos/code-mancers/leave-tracker/releases{/id}","deployments_url":"https://api.github.com/repos/code-mancers/leave-tracker/deployments","created_at":"2016-06-20T05:04:39Z","updated_at":"2016-06-20T07:02:28Z","pushed_at":"2016-07-13T11:48:37Z","git_url":"git://github.com/code-mancers/leave-tracker.git","ssh_url":"git@github.com:code-mancers/leave-tracker.git","clone_url":"https://github.com/code-mancers/leave-tracker.git","svn_url":"https://github.com/code-mancers/leave-tracker","homepage":null,"size":296,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17"},"html":{"href":"https://github.com/code-mancers/leave-tracker/pull/17"},"issue":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/issues/17"},"comments":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/code-mancers/leave-tracker/statuses/b2b89edb573424efea00a65b0cff37cdf636ce88"}}}}
{"actor":{"display_login":"HarshwardhanSingh"}}