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()