@ffflorian/icanhazdadjoke
An icanhazdadjoke.com API client with a CLI.
Last updated 3 days ago by ffflorian .
GPL-3.0 · Repository · Original npm · Tarball · package.json
$ cnpm install @ffflorian/icanhazdadjoke 
SYNC missed versions from official npm registry.

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
});

Current Tags

  • 1.1.9                                ...           latest (3 days ago)

10 Versions

  • 1.1.9                                ...           3 days ago
  • 1.1.8                                ...           14 days ago
  • 1.1.7                                ...           a month ago
  • 1.1.6                                ...           a month ago
  • 1.1.5                                ...           3 months ago
  • 1.1.4                                ...           4 months ago
  • 1.1.3                                ...           4 months ago
  • 1.1.2                                ...           4 months ago
  • 1.1.1                                ...           4 months ago
  • 1.1.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 27
Last Day 0
Last Week 15
Last Month 25
Dependencies (2)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |