https://github.com/sbardian/wot-quotes
Wheel of Time quotes serverless function
https://github.com/sbardian/wot-quotes
heroku herokuapp stdlib wot
Last synced: 21 days ago
JSON representation
Wheel of Time quotes serverless function
- Host: GitHub
- URL: https://github.com/sbardian/wot-quotes
- Owner: sbardian
- Created: 2019-06-11T14:01:09.000Z (almost 6 years ago)
- Default Branch: dev
- Last Pushed: 2023-01-04T19:21:27.000Z (over 2 years ago)
- Last Synced: 2024-05-01T15:37:33.215Z (12 months ago)
- Topics: heroku, herokuapp, stdlib, wot
- Language: JavaScript
- Homepage:
- Size: 2.51 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/semantic-release/semantic-release)
[]()
[]()
[](https://github.com/sbardian/wot-quotes/issues)
[](https://github.com/sbardian/wot-quotes)# Serverless function that returns Wheel of Time quotes!
## [Demo](https://wot-quotes.netlify.app/) built using [react-wot-quotes](https://github.com/sbardian/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/[email protected]/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/[email protected]/?credit=Thom&limit=2
### Example using random:
https://sbardian.api.stdlib.com/[email protected]/?random=true
### Javascript
```javascript
fetch(
'https://sbardian.api.stdlib.com/[email protected]/?credit=Thom&random=true',
)
.then(function(response) {
return response.json();
})
.then(function(myJson) {
console.log(JSON.stringify(myJson));
});
```