{"action":"created","comment":{"url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/comments/66336846","id":66336846,"diff_hunk":"@@ -0,0 +1,65 @@\n+# Run with Python 3\n+import requests\n+\n+# 1. Get your keys at https://stepic.org/oauth2/applications/ (client type = confidential,\n+# authorization grant type = client credentials)\n+client_id = \"...\"\n+client_secret = \"...\"\n+\n+# 2. Get a token\n+auth = requests.auth.HTTPBasicAuth(client_id, client_secret)\n+resp = requests.post('https://stepic.org/oauth2/token/',\n+                     data={'grant_type': 'client_credentials'},\n+                     auth=auth\n+                     )\n+token = resp.json()['access_token']\n+\n+# 3. Call API (https://stepic.org/api/docs/) using this token.\n+# Example:\n+\n+\n+def get_user_id():\n+    api_url = 'https://stepic.org/api/stepics/1'","path":"examples/get_certificates_urls_example.py","position":22,"original_position":22,"commit_id":"d732736f603a6dee37eb66c1fb5c542293a5f277","original_commit_id":"d732736f603a6dee37eb66c1fb5c542293a5f277","user":{"login":"taery","id":8366351,"avatar_url":"https://avatars.githubusercontent.com/u/8366351?v=3","gravatar_id":"","url":"https://api.github.com/users/taery","html_url":"https://github.com/taery","followers_url":"https://api.github.com/users/taery/followers","following_url":"https://api.github.com/users/taery/following{/other_user}","gists_url":"https://api.github.com/users/taery/gists{/gist_id}","starred_url":"https://api.github.com/users/taery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taery/subscriptions","organizations_url":"https://api.github.com/users/taery/orgs","repos_url":"https://api.github.com/users/taery/repos","events_url":"https://api.github.com/users/taery/events{/privacy}","received_events_url":"https://api.github.com/users/taery/received_events","type":"User","site_admin":false},"body":"кстати, а почему именно такой user_id? у меня получается нет сертификатов у пользователя.","created_at":"2016-06-08T20:48:55Z","updated_at":"2016-06-08T20:48:55Z","html_url":"https://github.com/StepicOrg/Stepic-API/pull/28#discussion_r66336846","pull_request_url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/comments/66336846"},"html":{"href":"https://github.com/StepicOrg/Stepic-API/pull/28#discussion_r66336846"},"pull_request":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28","id":71835178,"html_url":"https://github.com/StepicOrg/Stepic-API/pull/28","diff_url":"https://github.com/StepicOrg/Stepic-API/pull/28.diff","patch_url":"https://github.com/StepicOrg/Stepic-API/pull/28.patch","issue_url":"https://api.github.com/repos/StepicOrg/Stepic-API/issues/28","number":28,"state":"open","locked":false,"title":"Example of getting all certificates urls","user":{"login":"rbbelka","id":11516717,"avatar_url":"https://avatars.githubusercontent.com/u/11516717?v=3","gravatar_id":"","url":"https://api.github.com/users/rbbelka","html_url":"https://github.com/rbbelka","followers_url":"https://api.github.com/users/rbbelka/followers","following_url":"https://api.github.com/users/rbbelka/following{/other_user}","gists_url":"https://api.github.com/users/rbbelka/gists{/gist_id}","starred_url":"https://api.github.com/users/rbbelka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbbelka/subscriptions","organizations_url":"https://api.github.com/users/rbbelka/orgs","repos_url":"https://api.github.com/users/rbbelka/repos","events_url":"https://api.github.com/users/rbbelka/events{/privacy}","received_events_url":"https://api.github.com/users/rbbelka/received_events","type":"User","site_admin":false},"body":"Pull request  from Yalysheva Natalia due to JetBrains internship task.\r\n\r\nFaced the problem that certificates are not grouped in first pages what cases more than 1000 requests to pages with empty field 'certificates'. ","created_at":"2016-05-29T19:22:26Z","updated_at":"2016-06-08T20:48:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fd25bffca7b0f5855ad9f5fd42efc802255d791","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28/commits","review_comments_url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28/comments","review_comment_url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StepicOrg/Stepic-API/issues/28/comments","statuses_url":"https://api.github.com/repos/StepicOrg/Stepic-API/statuses/d732736f603a6dee37eb66c1fb5c542293a5f277","head":{"label":"rbbelka:master","ref":"master","sha":"d732736f603a6dee37eb66c1fb5c542293a5f277","user":{"login":"rbbelka","id":11516717,"avatar_url":"https://avatars.githubusercontent.com/u/11516717?v=3","gravatar_id":"","url":"https://api.github.com/users/rbbelka","html_url":"https://github.com/rbbelka","followers_url":"https://api.github.com/users/rbbelka/followers","following_url":"https://api.github.com/users/rbbelka/following{/other_user}","gists_url":"https://api.github.com/users/rbbelka/gists{/gist_id}","starred_url":"https://api.github.com/users/rbbelka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbbelka/subscriptions","organizations_url":"https://api.github.com/users/rbbelka/orgs","repos_url":"https://api.github.com/users/rbbelka/repos","events_url":"https://api.github.com/users/rbbelka/events{/privacy}","received_events_url":"https://api.github.com/users/rbbelka/received_events","type":"User","site_admin":false},"repo":{"id":59955386,"name":"Stepic-API","full_name":"rbbelka/Stepic-API","owner":{"login":"rbbelka","id":11516717,"avatar_url":"https://avatars.githubusercontent.com/u/11516717?v=3","gravatar_id":"","url":"https://api.github.com/users/rbbelka","html_url":"https://github.com/rbbelka","followers_url":"https://api.github.com/users/rbbelka/followers","following_url":"https://api.github.com/users/rbbelka/following{/other_user}","gists_url":"https://api.github.com/users/rbbelka/gists{/gist_id}","starred_url":"https://api.github.com/users/rbbelka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbbelka/subscriptions","organizations_url":"https://api.github.com/users/rbbelka/orgs","repos_url":"https://api.github.com/users/rbbelka/repos","events_url":"https://api.github.com/users/rbbelka/events{/privacy}","received_events_url":"https://api.github.com/users/rbbelka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rbbelka/Stepic-API","description":"API documentation and Examples","fork":true,"url":"https://api.github.com/repos/rbbelka/Stepic-API","forks_url":"https://api.github.com/repos/rbbelka/Stepic-API/forks","keys_url":"https://api.github.com/repos/rbbelka/Stepic-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbbelka/Stepic-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbbelka/Stepic-API/teams","hooks_url":"https://api.github.com/repos/rbbelka/Stepic-API/hooks","issue_events_url":"https://api.github.com/repos/rbbelka/Stepic-API/issues/events{/number}","events_url":"https://api.github.com/repos/rbbelka/Stepic-API/events","assignees_url":"https://api.github.com/repos/rbbelka/Stepic-API/assignees{/user}","branches_url":"https://api.github.com/repos/rbbelka/Stepic-API/branches{/branch}","tags_url":"https://api.github.com/repos/rbbelka/Stepic-API/tags","blobs_url":"https://api.github.com/repos/rbbelka/Stepic-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbbelka/Stepic-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbbelka/Stepic-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbbelka/Stepic-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbbelka/Stepic-API/statuses/{sha}","languages_url":"https://api.github.com/repos/rbbelka/Stepic-API/languages","stargazers_url":"https://api.github.com/repos/rbbelka/Stepic-API/stargazers","contributors_url":"https://api.github.com/repos/rbbelka/Stepic-API/contributors","subscribers_url":"https://api.github.com/repos/rbbelka/Stepic-API/subscribers","subscription_url":"https://api.github.com/repos/rbbelka/Stepic-API/subscription","commits_url":"https://api.github.com/repos/rbbelka/Stepic-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbbelka/Stepic-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbbelka/Stepic-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbbelka/Stepic-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbbelka/Stepic-API/contents/{+path}","compare_url":"https://api.github.com/repos/rbbelka/Stepic-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbbelka/Stepic-API/merges","archive_url":"https://api.github.com/repos/rbbelka/Stepic-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbbelka/Stepic-API/downloads","issues_url":"https://api.github.com/repos/rbbelka/Stepic-API/issues{/number}","pulls_url":"https://api.github.com/repos/rbbelka/Stepic-API/pulls{/number}","milestones_url":"https://api.github.com/repos/rbbelka/Stepic-API/milestones{/number}","notifications_url":"https://api.github.com/repos/rbbelka/Stepic-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbbelka/Stepic-API/labels{/name}","releases_url":"https://api.github.com/repos/rbbelka/Stepic-API/releases{/id}","deployments_url":"https://api.github.com/repos/rbbelka/Stepic-API/deployments","created_at":"2016-05-29T17:24:51Z","updated_at":"2016-05-29T17:24:52Z","pushed_at":"2016-06-08T20:24:36Z","git_url":"git://github.com/rbbelka/Stepic-API.git","ssh_url":"git@github.com:rbbelka/Stepic-API.git","clone_url":"https://github.com/rbbelka/Stepic-API.git","svn_url":"https://github.com/rbbelka/Stepic-API","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"StepicOrg:master","ref":"master","sha":"145b6a9c3977182fbe91deb41348e8e486672568","user":{"login":"StepicOrg","id":6727350,"avatar_url":"https://avatars.githubusercontent.com/u/6727350?v=3","gravatar_id":"","url":"https://api.github.com/users/StepicOrg","html_url":"https://github.com/StepicOrg","followers_url":"https://api.github.com/users/StepicOrg/followers","following_url":"https://api.github.com/users/StepicOrg/following{/other_user}","gists_url":"https://api.github.com/users/StepicOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/StepicOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StepicOrg/subscriptions","organizations_url":"https://api.github.com/users/StepicOrg/orgs","repos_url":"https://api.github.com/users/StepicOrg/repos","events_url":"https://api.github.com/users/StepicOrg/events{/privacy}","received_events_url":"https://api.github.com/users/StepicOrg/received_events","type":"Organization","site_admin":false},"repo":{"id":58641126,"name":"Stepic-API","full_name":"StepicOrg/Stepic-API","owner":{"login":"StepicOrg","id":6727350,"avatar_url":"https://avatars.githubusercontent.com/u/6727350?v=3","gravatar_id":"","url":"https://api.github.com/users/StepicOrg","html_url":"https://github.com/StepicOrg","followers_url":"https://api.github.com/users/StepicOrg/followers","following_url":"https://api.github.com/users/StepicOrg/following{/other_user}","gists_url":"https://api.github.com/users/StepicOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/StepicOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StepicOrg/subscriptions","organizations_url":"https://api.github.com/users/StepicOrg/orgs","repos_url":"https://api.github.com/users/StepicOrg/repos","events_url":"https://api.github.com/users/StepicOrg/events{/privacy}","received_events_url":"https://api.github.com/users/StepicOrg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StepicOrg/Stepic-API","description":"API documentation and Examples","fork":false,"url":"https://api.github.com/repos/StepicOrg/Stepic-API","forks_url":"https://api.github.com/repos/StepicOrg/Stepic-API/forks","keys_url":"https://api.github.com/repos/StepicOrg/Stepic-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StepicOrg/Stepic-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StepicOrg/Stepic-API/teams","hooks_url":"https://api.github.com/repos/StepicOrg/Stepic-API/hooks","issue_events_url":"https://api.github.com/repos/StepicOrg/Stepic-API/issues/events{/number}","events_url":"https://api.github.com/repos/StepicOrg/Stepic-API/events","assignees_url":"https://api.github.com/repos/StepicOrg/Stepic-API/assignees{/user}","branches_url":"https://api.github.com/repos/StepicOrg/Stepic-API/branches{/branch}","tags_url":"https://api.github.com/repos/StepicOrg/Stepic-API/tags","blobs_url":"https://api.github.com/repos/StepicOrg/Stepic-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StepicOrg/Stepic-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StepicOrg/Stepic-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/StepicOrg/Stepic-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StepicOrg/Stepic-API/statuses/{sha}","languages_url":"https://api.github.com/repos/StepicOrg/Stepic-API/languages","stargazers_url":"https://api.github.com/repos/StepicOrg/Stepic-API/stargazers","contributors_url":"https://api.github.com/repos/StepicOrg/Stepic-API/contributors","subscribers_url":"https://api.github.com/repos/StepicOrg/Stepic-API/subscribers","subscription_url":"https://api.github.com/repos/StepicOrg/Stepic-API/subscription","commits_url":"https://api.github.com/repos/StepicOrg/Stepic-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/StepicOrg/Stepic-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/StepicOrg/Stepic-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/StepicOrg/Stepic-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/StepicOrg/Stepic-API/contents/{+path}","compare_url":"https://api.github.com/repos/StepicOrg/Stepic-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StepicOrg/Stepic-API/merges","archive_url":"https://api.github.com/repos/StepicOrg/Stepic-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StepicOrg/Stepic-API/downloads","issues_url":"https://api.github.com/repos/StepicOrg/Stepic-API/issues{/number}","pulls_url":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls{/number}","milestones_url":"https://api.github.com/repos/StepicOrg/Stepic-API/milestones{/number}","notifications_url":"https://api.github.com/repos/StepicOrg/Stepic-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StepicOrg/Stepic-API/labels{/name}","releases_url":"https://api.github.com/repos/StepicOrg/Stepic-API/releases{/id}","deployments_url":"https://api.github.com/repos/StepicOrg/Stepic-API/deployments","created_at":"2016-05-12T12:51:21Z","updated_at":"2016-05-27T09:57:00Z","pushed_at":"2016-06-08T20:24:37Z","git_url":"git://github.com/StepicOrg/Stepic-API.git","ssh_url":"git@github.com:StepicOrg/Stepic-API.git","clone_url":"https://github.com/StepicOrg/Stepic-API.git","svn_url":"https://github.com/StepicOrg/Stepic-API","homepage":null,"size":154,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":9,"forks":42,"open_issues":9,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28"},"html":{"href":"https://github.com/StepicOrg/Stepic-API/pull/28"},"issue":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/issues/28"},"comments":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/StepicOrg/Stepic-API/statuses/d732736f603a6dee37eb66c1fb5c542293a5f277"}}}}
{"actor":{"display_login":"taery"}}