Because The Good Place is iconic.
This is the simplest server supporting both REST and GraphQL.
https://good-place-quotes.herokuapp.com/
The Access-Control-Allow-Origin
header is set to *
so that you can make requests from any domain.
Returns an array with all quotes:
[
{
character: 'Michael',
quote: 'Any place or thing in the universe can be up to 104% perfect. That\'s how you get Beyoncé.'
},
{
character: 'Eleanor',
quote: 'YA BASIC!'
},
{
character: 'Janet',
quote: 'Fun fact: Columbus is in The Bad Place cause of all the raping, slave trade and genocide.'
},
]
Returns an array with a single random quote object
{
character: "Janet",
quote: "Not a robot."
}
Returns an array with <name>
quotes e.g. GET /character/eleanor
.
Currently supporting: Eleanor, Chidi, Tahani, Jason, Michael, Pillboi, Derek
[
{
character: "Jason",
quote: "She's my everything. She makes the bass drop in my heart."
},
{
character: "Jason",
quote: "I wasn't a failed DJ. I was pre-successful."
},
{
character: "Jason",
quote: "I'm telling you, Molotov cocktails work. Anytime I had a problem and I threw a Molotov cocktail, boom! Right away, I had a different problem."
}
]
The endpoint for queries: https://good-place-quotes.herokuapp.com/graphql
To request all quotes, query quotes
:
quotes {
character
quote
}
Returns data
object with a quotes
array with all quotes:
"data": {
"quotes": [
{
"character": "Eleanor",
"quote": "Holy motherforking shirtballs!"
},
{
"character": "Chidi",
"quote": "There really is an afterlife. I can't wait to have breakfast with Kant, and lunch with Michel Foucault, and then have dinner with Kant again so we can talk about what came up at breakfast!"
},
{
"character": "Tahani",
"quote": "It run for 16 years on the BBC. It did nearly 30 episodes."
},
]
}
For a single randomly generated quote, query quote
:
quote {
character
quote
}
Returns data
object with a single quote
object
"data": {
"quote": {
"character": "Tahani",
"quote": "It's #TahaniTime."
}
}
Currently supporting: Eleanor, Chidi, Tahani, Jason, Michael, Pillboi, Derek.
To get quotes from a spefic character, query:
character(name:"Derek") {
quote
}
Returns data
object with character
array of quotes.
"data": {
"character": [
{
"quote": "Derek!"
},
{
"quote": "Maximum Derek!"
}
]
}
Demo app and source code of demo
The page is hosted on glitch and I'm using fetch
API to fetch data.
Demo app and source code of demo
The page is hosted on glitch and I'm using fetch
API to fetch data.