Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 890 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 890 Bytes

API 101 Workshop: Python

Getting started

To install all of the dependencies, please follow the next steps:

  1. Install Python [Ubuntu or Mac]

  2. Install requests dependency.

    pip install requests

APIs

I can haz Dad joke

The largest selection of dad jokes on the internet

python src/i_can_haz_dad_joke.py JOKES_AMOUNT

This script will use a JSON response like this one:

{
  "id": "R7UfaahVfFd",
  "joke": "My dog used to chase people on a bike a lot. It got so bad I had to take his bike away.",
  "status": 200
}

for printing a random Dad joke (and saving it as an image as well) as many times as JOKES_AMOUNT specifies.