Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Commit 3858a4e

Browse files
committed
🎨 Update
1 parent 6e63de1 commit 3858a4e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

githubapi2/githubuser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import sys
22
import requests
33

4+
GITHUB_API = "https://api.github.com"
45

56
def get_username():
67
return str(input("Username: "))
78

89

910
def get_user_details(username):
10-
return requests.get(f"https://api.github.com/users/{username}").json()
11+
return requests.get(f"{GITHUB_API}/users/{username}").json()
1112

1213

1314
def print_data(user_details):

0 commit comments

Comments
 (0)