Skip to content

sbardian/wot-quotes

dev
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

semantic-release Version License Issues Release Date

Serverless function that returns Wheel of Time quotes!

Demo built using react-wot-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));
  });

About

Wheel of Time quotes serverless function

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •