|
10 | 10 | user = requests.get('https://api.github.com/users/'+username) |
11 | 11 | user_json = json.loads(user.content or user.text) |
12 | 12 | #pprint(user_json) |
13 | | -print user_json['name'], user_json['html_url'], user_json['location'], user_json['email'], user_json['bio'], user_json['followers'], user_json['following'], user_json['public_repos'], user_json['public_gists'] |
| 13 | +print " DETAILS OF THE USER " |
| 14 | +print "USERNAME : "+str(user_json['name']) |
| 15 | +print "GITHUB LINK : "+str(user_json['html_url']) |
| 16 | +print "LOCATION : "+str(user_json['location']) |
| 17 | +print "EMAIL : "+str(user_json['email']) |
| 18 | +print "BIO : "+str(user_json['bio']) |
| 19 | +print "FOLLOWERS : "+str(user_json['followers']) |
| 20 | +print "FOLLOWING : "+str(user_json['following']) |
| 21 | +print "PUBLIC REPOS : "+str(user_json['public_repos']) |
| 22 | +print "PUBLIC GISTS : "+str(user_json['public_gists']) |
| 23 | +print |
| 24 | +print "*************************************************" |
14 | 25 |
|
15 | 26 | repos = requests.get('https://api.github.com/users/'+username+'/repos', params={'type':'owner','sort':'pushed'}) |
16 | 27 | repos_json = (json.loads(repos.content)) |
17 | 28 |
|
18 | 29 | for i in repos_json: |
19 | | - print i['name'],i['html_url'],i['forks_count'],i['stargazers_count'],i['watchers_count'],i['open_issues'],i['language'] |
| 30 | + print "NAME : "+str(i['name']) |
| 31 | + print "HTML-URL : "+str(i['html_url']) |
| 32 | + print "FORK COUNT : "+str(i['forks_count']) |
| 33 | + print "STARGAZERS COUNT : "+str(i['stargazers_count']) |
| 34 | + print "WATCHERS COUNT : "+str(i['watchers_count']) |
| 35 | + print "OPEN ISSUES : "+ str(i['open_issues']) |
| 36 | + print "LANGUAGE : "+str(i['language']) |
| 37 | + print |
| 38 | + print "*************************************************" |
20 | 39 |
|
21 | 40 | #response = requests.get('https://api.github.com/repos/sahildua2305/tweetogram/forks') |
22 | 41 | #pprint(json.loads(response.content)) |
| 42 | + |
0 commit comments