We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbcced9 commit 20c0a67Copy full SHA for 20c0a67
libpythonpro/__init__.py
libpythonpro/github_api.py
@@ -0,0 +1,17 @@
1
+import requests
2
+
3
4
+def buscar_avatar(usuario):
5
+ """
6
+ Busca o avatar de um usuário no Github
7
8
+ :param usuario: str com o nome de usuário no github
9
+ :return: str com o link do avatar
10
11
+ url = f'https://api.github.com/users/{usuario}'
12
+ resp = requests.get(url)
13
+ return resp.json()['avatar_url']
14
15
16
+if __name__ == '__main__':
17
+ print(buscar_avatar('renzon'))
requirements.txt
@@ -0,0 +1,5 @@
+certifi==2018.4.16
+chardet==3.0.4
+idna==2.6
+requests==2.18.4
+urllib3==1.22
0 commit comments