Python
Python request method The "endpoint" parameter must be a valid type
get
https://neko-love.xyz
/api/v1/:endpoint
1
import requests
2
3
def nekoGET(endpoint):
4
r = requests.get("https://neko-love.xyz/api/v1/" + endpoint)
5
if r.status_code != 200:
6
print("An error has occurred")
7
else:
8
print(r.json()["url"])
9
10
nekoGET("neko")
Copied!
Last modified 1yr ago
Copy link