GitHub PullRequestEvent at 2014-10-25 14:26:24
Repository: Net-Google-DataAPI
Actor: shogo82148
Payload: {"action":"opened","number":7,"pull_request":{"url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/7","id":23339631,"html_url":"https://github.com/lopnor/Net-Google-DataAPI/pull/7","diff_url":"https://github.com/lopnor/Net-Google-DataAPI/pull/7.diff","patch_url":"https://github.com/lopnor/Net-Google-DataAPI/pull/7.patch","issue_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues/7","number":7,"state":"open","locked":false,"title":"support JSON Web Token","user":{"login":"shogo82148","id":1157344,"avatar_url":"https://avatars.githubusercontent.com/u/1157344?v=2","gravatar_id":"","url":"https://api.github.com/users/shogo82148","html_url":"https://github.com/shogo82148","followers_url":"https://api.github.com/users/shogo82148/followers","following_url":"https://api.github.com/users/shogo82148/following{/other_user}","gists_url":"https://api.github.com/users/shogo82148/gists{/gist_id}","starred_url":"https://api.github.com/users/shogo82148/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogo82148/subscriptions","organizations_url":"https://api.github.com/users/shogo82148/orgs","repos_url":"https://api.github.com/users/shogo82148/repos","events_url":"https://api.github.com/users/shogo82148/events{/privacy}","received_events_url":"https://api.github.com/users/shogo82148/received_events","type":"User","site_admin":false},"body":"Hello\r\nI want to use Service Account for authorization but Net::Google::DataAPI seems not to support it now.\r\nSo, I implemented [Using OAuth 2.0 for Server to Server Applications](https://developers.google.com/accounts/docs/OAuth2ServiceAccount).\r\n\r\n`Net::Google::DataAPI::Auth::OAuth2::SignedJWT` uses private key instead of password for authorization.\r\n\r\n``` perl\r\nuse Net::Google::DataAPI::Auth::OAuth2::SignedJWT;\r\nmy $oauth2 = Net::Google::DataAPI::Auth::OAuth2->new(\r\n     private_key => <<'__KEY__',\r\n-----BEGIN PRIVATE KEY-----\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n-----END PRIVATE KEY-----\r\n__KEY__\r\n     service_account => 'xxxxxxx@developer.gserviceaccount.com',\r\n     scope => ['http://spreadsheets.google.com/feeds/'],\r\n );\r\n$oauth2->get_access_token or die;\r\nmy $client = Net::Google::Spreadsheets->new(auth => $oauth2);\r\n```","created_at":"2014-10-25T14:26:24Z","updated_at":"2014-10-25T14:26:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/7/commits","review_comments_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/7/comments","review_comment_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/comments/{number}","comments_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues/7/comments","statuses_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/statuses/a5696d9c5563c36c1dd12d8ca6ee6ffd9822f0fa","head":{"label":"shogo82148:oauth2-signed-jwt","ref":"oauth2-signed-jwt","sha":"a5696d9c5563c36c1dd12d8ca6ee6ffd9822f0fa","user":{"login":"shogo82148","id":1157344,"avatar_url":"https://avatars.githubusercontent.com/u/1157344?v=2","gravatar_id":"","url":"https://api.github.com/users/shogo82148","html_url":"https://github.com/shogo82148","followers_url":"https://api.github.com/users/shogo82148/followers","following_url":"https://api.github.com/users/shogo82148/following{/other_user}","gists_url":"https://api.github.com/users/shogo82148/gists{/gist_id}","starred_url":"https://api.github.com/users/shogo82148/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogo82148/subscriptions","organizations_url":"https://api.github.com/users/shogo82148/orgs","repos_url":"https://api.github.com/users/shogo82148/repos","events_url":"https://api.github.com/users/shogo82148/events{/privacy}","received_events_url":"https://api.github.com/users/shogo82148/received_events","type":"User","site_admin":false},"repo":{"id":25718950,"name":"Net-Google-DataAPI","full_name":"shogo82148/Net-Google-DataAPI","owner":{"login":"shogo82148","id":1157344,"avatar_url":"https://avatars.githubusercontent.com/u/1157344?v=2","gravatar_id":"","url":"https://api.github.com/users/shogo82148","html_url":"https://github.com/shogo82148","followers_url":"https://api.github.com/users/shogo82148/followers","following_url":"https://api.github.com/users/shogo82148/following{/other_user}","gists_url":"https://api.github.com/users/shogo82148/gists{/gist_id}","starred_url":"https://api.github.com/users/shogo82148/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogo82148/subscriptions","organizations_url":"https://api.github.com/users/shogo82148/orgs","repos_url":"https://api.github.com/users/shogo82148/repos","events_url":"https://api.github.com/users/shogo82148/events{/privacy}","received_events_url":"https://api.github.com/users/shogo82148/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shogo82148/Net-Google-DataAPI","description":"","fork":true,"url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI","forks_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/forks","keys_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/teams","hooks_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/hooks","issue_events_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/issues/events{/number}","events_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/events","assignees_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/assignees{/user}","branches_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/branches{/branch}","tags_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/tags","blobs_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/languages","stargazers_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/stargazers","contributors_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/contributors","subscribers_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/subscribers","subscription_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/subscription","commits_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/issues/comments/{number}","contents_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/contents/{+path}","compare_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/merges","archive_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/downloads","issues_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/issues{/number}","pulls_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/labels{/name}","releases_url":"https://api.github.com/repos/shogo82148/Net-Google-DataAPI/releases{/id}","created_at":"2014-10-25T03:41:19Z","updated_at":"2014-09-08T20:27:08Z","pushed_at":"2014-10-25T14:10:20Z","git_url":"git://github.com/shogo82148/Net-Google-DataAPI.git","ssh_url":"git@github.com:shogo82148/Net-Google-DataAPI.git","clone_url":"https://github.com/shogo82148/Net-Google-DataAPI.git","svn_url":"https://github.com/shogo82148/Net-Google-DataAPI","homepage":"","size":335,"stargazers_count":0,"watchers_count":0,"language":null,"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":"lopnor:master","ref":"master","sha":"eec2fc07fe6de05212755ea23e1ec98368725494","user":{"login":"lopnor","id":24658,"avatar_url":"https://avatars.githubusercontent.com/u/24658?v=2","gravatar_id":"","url":"https://api.github.com/users/lopnor","html_url":"https://github.com/lopnor","followers_url":"https://api.github.com/users/lopnor/followers","following_url":"https://api.github.com/users/lopnor/following{/other_user}","gists_url":"https://api.github.com/users/lopnor/gists{/gist_id}","starred_url":"https://api.github.com/users/lopnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lopnor/subscriptions","organizations_url":"https://api.github.com/users/lopnor/orgs","repos_url":"https://api.github.com/users/lopnor/repos","events_url":"https://api.github.com/users/lopnor/events{/privacy}","received_events_url":"https://api.github.com/users/lopnor/received_events","type":"User","site_admin":false},"repo":{"id":285001,"name":"Net-Google-DataAPI","full_name":"lopnor/Net-Google-DataAPI","owner":{"login":"lopnor","id":24658,"avatar_url":"https://avatars.githubusercontent.com/u/24658?v=2","gravatar_id":"","url":"https://api.github.com/users/lopnor","html_url":"https://github.com/lopnor","followers_url":"https://api.github.com/users/lopnor/followers","following_url":"https://api.github.com/users/lopnor/following{/other_user}","gists_url":"https://api.github.com/users/lopnor/gists{/gist_id}","starred_url":"https://api.github.com/users/lopnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lopnor/subscriptions","organizations_url":"https://api.github.com/users/lopnor/orgs","repos_url":"https://api.github.com/users/lopnor/repos","events_url":"https://api.github.com/users/lopnor/events{/privacy}","received_events_url":"https://api.github.com/users/lopnor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lopnor/Net-Google-DataAPI","description":"","fork":false,"url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI","forks_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/forks","keys_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/teams","hooks_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/hooks","issue_events_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues/events{/number}","events_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/events","assignees_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/assignees{/user}","branches_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/branches{/branch}","tags_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/tags","blobs_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/languages","stargazers_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/stargazers","contributors_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/contributors","subscribers_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/subscribers","subscription_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/subscription","commits_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues/comments/{number}","contents_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/contents/{+path}","compare_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/merges","archive_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/downloads","issues_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues{/number}","pulls_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/labels{/name}","releases_url":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/releases{/id}","created_at":"2009-08-22T13:10:02Z","updated_at":"2014-09-08T20:27:08Z","pushed_at":"2014-06-28T08:21:51Z","git_url":"git://github.com/lopnor/Net-Google-DataAPI.git","ssh_url":"git@github.com:lopnor/Net-Google-DataAPI.git","clone_url":"https://github.com/lopnor/Net-Google-DataAPI.git","svn_url":"https://github.com/lopnor/Net-Google-DataAPI","homepage":"","size":335,"stargazers_count":7,"watchers_count":7,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":2,"forks":7,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/7"},"html":{"href":"https://github.com/lopnor/Net-Google-DataAPI/pull/7"},"issue":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues/7"},"comments":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/lopnor/Net-Google-DataAPI/statuses/a5696d9c5563c36c1dd12d8ca6ee6ffd9822f0fa"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":235,"deletions":0,"changed_files":3}}