From 58ee4f4da512422841256ddf583099165e386895 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Mon, 29 Jun 2015 14:41:21 +0300 Subject: [PATCH] Extended Github API request calls with ID+Secret --- SE_API/GitHub_API_Connector.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SE_API/GitHub_API_Connector.py b/SE_API/GitHub_API_Connector.py index 78fbf85..dbafa03 100644 --- a/SE_API/GitHub_API_Connector.py +++ b/SE_API/GitHub_API_Connector.py @@ -1,21 +1,23 @@ __author__ = 'sagi' import requests +from GithubAPI.GithubAPI import GitHubAPI_Keys +githubKeys = GitHubAPI_Keys() def get_repo_general_info(repo_url): - url = 'https://api.github.com/repos/' + repo_url + url = 'https://api.github.com/repos/' + repo_url + '?client_id='+githubKeys.getId()+'&client_secret=' + githubKeys.getSecret() req = requests.get(url) return req.json() def get_repo_stats(repo_url): - url = 'https://api.github.com/repos/' + repo_url + '/stats/contributors' + url = 'https://api.github.com/repos/' + repo_url + '/stats/contributors' + '?client_id='+githubKeys.getId()+'&client_secret=' + githubKeys.getSecret() req = requests.get(url) return req.json() def get_repo_issues(repo_url): - url = 'https://api.github.com/repos/' + repo_url + '/issues' + url = 'https://api.github.com/repos/' + repo_url + '/issues' + '?client_id=' + githubKeys.getId() + '&client_secret=' + githubKeys.getSecret() req = requests.get(url) return req.json()