API Usage Python

Get facts using requests:

donut.py
from requests import get
fact = get(url='https://api.elian.webstie/fact').json() # url is subject to change
print(fact['fact'])
Example of the code above as a .txt file (outdated link)

Get jokes using requests (beta):

from requests import get
joke = get(url='https://api.elian.websit/joke').json() # url is subject to change
print(joke['joke'])

Get facts using tokens:

Last updated

Was this helpful?