2.2.9 • Published 9 months ago
@ffflorian/icanhazdadjoke v2.2.9
ICanHazDadJoke 
An ICanHazDadJoke API client with a CLI.
Usage
A complete documentation is available at https://ffflorian.github.io/api-clients/packages/icanhazdadjoke/.
CLI
To use ICanHazDadJoke
globally, run yarn global add @ffflorian/icanhazdadjoke
or npm i -g @ffflorian/icanhazdadjoke
.
Usage: icanhazdadjoke [options] [command]
An icanhazdadjoke.com API client with a CLI.
Options:
-v, --version output the version number
-o, --output <dir> Specify the output directory (default: current directory)
-i, --image Save the joke as image
-s, --silent Don't output save messages
-h, --help output usage information
Commands:
random Fetch a random dad joke
id <id> Fetch a dad joke by ID
Installation
Run yarn add @ffflorian/icanhazdadjoke
or npm install @ffflorian/icanhazdadjoke
.
Example
import {ICanHazDadJoke} from '@ffflorian/icanhazdadjoke';
const iCanHazDadJoke = new ICanHazDadJoke();
iCanHazDadJoke.api.getRandom().then(result => {
// JokeResult
});
iCanHazDadJoke.api.getById('R7UfaahVfFd').then(result => {
// JokeResult
});
iCanHazDadJoke.api.getRandom({withImage: true}).then(result => {
// JokeResultWithImage
});
iCanHazDadJoke.api.getById('R7UfaahVfFd', {withImage: true}).then(result => {
// JokeResultWithImage
});
iCanHazDadJoke.api.search('dog').then(result => {
// JokeSearchResult
});
iCanHazDadJoke.api.search({term: 'dog', limit: 5}).then(result => {
// JokeSearchResult
});
iCanHazDadJoke.api.search('dog', {limit: 5}).then(result => {
// JokeSearchResult
});
2.2.9
9 months ago
2.2.8
12 months ago
2.2.7
2 years ago
2.2.6
2 years ago
2.2.5
2 years ago
2.2.4
2 years ago
2.2.3
2 years ago
2.2.2
3 years ago
2.2.1
3 years ago
2.2.0
3 years ago
2.1.1
4 years ago
2.1.0
4 years ago
2.0.6
4 years ago
2.0.5
4 years ago
2.0.4
4 years ago
2.0.3
4 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.3.0
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.12
5 years ago
1.1.11
5 years ago
1.1.10
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago