npm.io
1.0.3 • Published 4 years ago

quotable-ts

Licence
ISC
Version
1.0.3
Deps
1
Size
50 kB
Vulns
0
Weekly
0

quotable-ts

Wrapper for the quotable API

Import Library

import { QuotableApi } from 'quotable-ts';

Get Random Quote

const api = new QuotableApi();
console.log(await api.getRandomQuote());

All requests that can be performed

  • getRandomQuote()
  • getQuoteList()
  • getQuoteById()
  • searchQuote()
  • getAuthorList()
  • getAuthorById()
  • searchAuthors()
  • getAllTags()

Provide Parameter for Request

const api = new QuotableApi();
console.log(await api.getRandomQuote({
    author: 'Elbert Hubbard'
}));

To see what parameters you can give to the requests look at Documentation from lukePeavey

Keywords