Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lukePeavey committed Sep 17, 2017
0 parents commit 58969b2
Show file tree
Hide file tree
Showing 5 changed files with 6,216 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitignore
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*
40 changes: 40 additions & 0 deletions README.md
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}`)
}
```
Loading

0 comments on commit 58969b2

Please sign in to comment.