Skip to content

givensuman/johnmulapi

Repository files navigation

johnmulapi

An API for John Mulaney quotes

johnmulapi.givensuman.com

api.johnmulapi.givensuman.com

How do I use this?

# shell
$ curl https://api.johnmulapi.givensuman.com
// javascript
fetch('https://api.johnmulapi.givensuman.com')
   .then(res => res.json())
   .then(data => console.log(data);
# python
import requests
quote = (requests
  .get('https://api.johnmulapi.givensuman.com')
  .json())
print(quote)

👇

{
  "data": "I don't look older, I just look worse.",
  "status": 200,
  "message": null
}

Parameters

name type default description
quantity number 1 Number of quotes to return
minLength number undefined Minimum length of the quotes to return
maxLength number undefined Maximum length of the quotes to return
unique boolean false Whether the returned quotes (if multiple) must be unique
# example usage
curl https://api.johnmulapi.givensuman.com/?quantity=5&unique=true&maxLength=75

Can I use this in a project?

Please do. Let me know how it goes.

John Mulaney's Head

Shamelessly inspired by kanye.rest