iquotes
Get inspirational quotes
Introduction
API of inspirational >280 quotes (Carefully collected) with 3 category:
- Life (~160 quotes)
- Love (~100 quotes)
- Development (~20 quotes)
Install
$ npm install iquotes
Usage
const iquotes = ; iquotes;// {// "quote": "The master has failed more times than the beginner has even tried.",// "author": "Stephen McCranie",// "category": "Life"// } // View API for more usage
API
.all(category: string = 'all'): object[]
Get list of all quotes by categories
iquotesall'life';// oriquotesall; // To get all quotes // [// {// "quote": "The master has failed more times than the beginner has even tried.",// "author": "Stephen McCranie",// "category": "Life"// },// {...},// ...// ]
.random(category: string = 'all'): object
Get random quotes from all quotes or by cagegories
iquotes; // oriquotes; // To get random life quotes // {// "quote": "The master has failed more times than the beginner has even tried.",// "author": "Stephen McCranie",// "category": "Life"// }
.count(category: string = 'all'): number
Get number of all quotes or number of quotes by categories
iquotes;// 280iquotes;// 100
.countDetail(): object[]
Get detail number of all categories
iquotes; // [// { type: 'life', count: 162 },// { type: 'love', count: 100 },// { type: 'dev', count: 18 },// { type: 'all', count: 280 } // ]
.categories(): string[]
iquotes; // ['life', 'love', 'dev', 'all'];
Supported Categories
life
love
dev
(Development)all
- Default (If not provide any categories or provideall
)
Related
- iquotes-cli - Cool CLI for this module
License
MIT © Kyoz