forked from lukePeavey/quotable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 58969b2
Showing
5 changed files
with
6,216 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
yarn.lock | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Quota | ||
========================= | ||
_Random quote API_ | ||
|
||
I built this for a freeCodeCamp project. Anyone is welcome to use it | ||
|
||
- Database with roughly 1500 famous quotes | ||
- Easy to use | ||
- Allows requests over HTTP or HTTPS | ||
|
||
### Usage | ||
To get a new random quote, make a request to: | ||
`https://quota.glitch.me/random` | ||
|
||
This returns a JSON object in the following format: | ||
``` | ||
{ | ||
quoteText: String | ||
quoteAuthor: String | ||
} | ||
``` | ||
|
||
|
||
##### Javascript Example | ||
|
||
```js | ||
fetch('https://quota.glitch.me/random') | ||
.then(response => response.json()) | ||
.then(data => { | ||
console.log(`${data.quoteText} -${data.quoteAuthor}`) | ||
}) | ||
``` | ||
|
||
##### jQuery Example | ||
|
||
```js | ||
$.getJSON('https://quota.glitch.me/random'), function(data) { | ||
console.log(`${data.quoteText} -${data.quoteAuthor}`) | ||
} | ||
``` |
Oops, something went wrong.