Skip to content

muhtarudinsiregar/chucknorris-quotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chucknorris quotes

Build Status Codacy Badge

Installation

yarn add chucknorris-quotes or npm install chucknorris-quotes

Usage

const cq = require("chucknorris-quotes");

// get random joke
cq.getRandomJoke().then((response) => {
    console.log(response.data);
});

API

getRandomJoke

cq.getRandomJoke().then((response) => {
    console.log(response.data);
    //=>{ "type": "success", "value": { "id": 467, "joke": "Chuck Norris can delete the Recycling Bin.", "categories": ["nerdy"] } }
});

getRandomJokes(number)

getCategories

getNumberOfJokes

Reference

http://www.icndb.com/api/