See for full usage: https://thesimpsonsquoteapi.glitch.me/
https://thesimpsonsquoteapi.glitch.me/quotes
https://thesimpsonsquoteapi.glitch.me/quotes?count=num
https://thesimpsonsquoteapi.glitch.me/quotes?character=ho //Would return a quote from Homer or Milhouse
https://thesimpsonsquoteapi.glitch.me/quotes?character=homer simpson //Would return a quote only from Homer
https://thesimpsonsquoteapi.glitch.me/quotes?count=15&character=ho //Would return up to 15 quotes from Homer and Milhouse
The returned JSON data will contain four properties including the quote, the character who said the quote, an image of the character, and the direction in which the character is facing.
[
{
"quote": "Shoplifting is a victimless crime, like punching someone in the dark.",
"character": "Nelson Muntz",
"image" : "https://cdn.glitch.com/3c3ffadc-3406-4440-bb95-d40ec8fcde72%2FNelsonMuntz.png?1497567511185",
"characterDirection" : "Left"
}
]
https://github.com/HPaulson/Simpsons-Quotes
npm install @hpaulson/simpsons-quotes --registry=https://npm.pkg.github.com/hpaulson
const simpsons = require('@hpaulson/simpsons-quotes')
simpsons.getQuotes("0")
.then((q) => {
console.log(q)
}).catch((e) => {
console.error(e)
})
Data Structure:
require('@hpaulson/simpsons-quotes')
.getQuotes("#") // Promise<Array, QuoteObject>
QuoteObject = {
quote // String<Quote>
image // String<ImageLink>
character // String<Character>
characterDirection // String<left | right>
}
https://github.com/HPaulson/Go-Simpsons-Quotes/
go get https://github.com/HPaulson/Go-Simpsons-Quotes/src
package main
import (
"fmt"
"log"
simpsons "simpsons/simpsons"
)
func main() {
data, err := simpsons.GetQuotes("0")
if err != nil {
log.Println(err)
}
fmt.Println(data[0].Quote)
}
Data Structure:
simpsons {
GetQuotes("<INT>") // Array<{data}>
}
data {
Quote // String<Quote>
Image // String<IMG_URL>
Character // String<Character>
CharacterDirection // String<Left | Right>
}