feat: simple tutorial for GET API
This commit is contained in:
1 parent
6bf35f0f2f
commit
82dbe7f887
1 file changed
+9
@@ -0,0 +1,9 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
def fetch_user(username: str) -> dict:
|
||||||
|
response = requests.get(f"https://www.codewars.com/api/v1/users/{username}")
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
|
print(fetch_user("cw-sandro"))
|
||||||
Reference in new issue
Block a user