/wot-quotes

Wheel of Time quotes serverless function

Primary LanguageJavaScript

semantic-release Version License Issues Release Date

Serverless function that returns Wheel of Time quotes!

Built with Heroku, Hasura and stdlib.

How to use

Browser

You can use a web browser to hit the serverless function here: https://sbardian.api.stdlib.com/wotQuotes@0.0.1/

URL parameter options:

  • credit (string): Character responsible for quote
  • limit (number): Number of quotes to return
  • random (boolean): Return one random quote

Example using credit and limit three URL parameter options:

https://sbardian.api.stdlib.com/wotQuotes@0.0.1/?credit=Thom&limit=2

Example using random:

https://sbardian.api.stdlib.com/wotQuotes@0.0.1/?random=true

Javascript

fetch(
  'https://sbardian.api.stdlib.com/wotQuotes@0.0.1/?credit=Thom&random=true',
)
  .then(function(response) {
    return response.json();
  })
  .then(function(myJson) {
    console.log(JSON.stringify(myJson));
  });