2.2.7 • Published 4 months ago

@ffflorian/icanhazdadjoke v2.2.7

Weekly downloads
51
License
GPL-3.0
Repository
github
Last release
4 months ago

ICanHazDadJoke npm version

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.7

4 months ago

2.2.6

6 months ago

2.2.5

11 months ago

2.2.4

1 year ago

2.2.3

1 year ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago