2.2.0 • Published 10 days ago

random-bunny v2.2.0

Weekly downloads
7
License
MIT
Repository
-
Last release
10 days ago

random-bunny

Get a random image url from a subreddit of your choosing.

Install

npm install --save random-bunny

or if you're using yarn

yarn add random-bunny

Binary

The project can be downloaded as a binary for your system via the GitHub Releases or Gitea Releases page.

Usage

import randomBunny from "random-bunny";

// ... In an async function
const result = await randomBunny('rabbits', 'hot');
console.log(result);

API

randomBunny()

Returns a json string for a random post. Accepts 2 arguments: subreddit, and sortby ('new', 'hot', 'top')

The json string which gets returned consists of:

  • archived
  • downs
  • hidden
  • permalink
  • subreddit
  • subredditSubscribers
  • title
  • ups
  • url

sortBy will default to 'hot' if not given or invalid

CLI

Random bunny can also be used as a CLI. This is accessible via the executable (see git releases) or via src/cli.ts

For more details, see the documentation.

Notes

Links

License

MIT © Vylpes

2.2.0

10 days ago

2.1.6

20 days ago

2.1.5

6 months ago

2.1.4

8 months ago

2.1.2

11 months ago

2.1.1

12 months ago

2.1.3

10 months ago

2.1.0

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

2.0.3

1 year ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago