bee-api

1.0.9 • Public • Published

alt text

Bee API

A minimalistic Api to fetch information from reddit

Table of Contents

  1. ChangeLog.
  2. Description.
  3. Usage.
  4. Options.
  5. Details.
  6. Contact information.

1. ChangeLog

  • You can new sort for new posts

2. Description

A simple and fast wrapper for fetching data from reddit posts.

3. Usage

const api = require('bee-api');

api({
    subreddit: 'cat',
    allowNSFW: false,
    allowModPost: true,
    allowCrossPost: true,
    allowVideo: true,
    newPosts: true
}).then(post => {
    console.log(post);
});

4. Options

Field Type Description Default
subreddit String .... N/A
allowNSFW boolean whether or not the returned post can be marked as NSFW false
allowModPost boolean whether or not the returned post can be distinguished as a mod post false
allowCrossPost boolean whether or not the returned post can be a crosspost false
allowVideo boolean whether or not the returned post can be a video false
newPosts boolean whether or not the returned post is a new post false

5. Details

  • By default, the Reddit JSON API should not return any removed or deleted posts.
  • Unhandled rejections can be caught and handled:
bla bla bla bla bla
}).then(post => {
    // some code here
}).catch(e => {
    console.error(`Rejection: ${e}`);
});

6. Contact information

Future updates

  • imgur api

Dependents (0)

Package Sidebar

Install

npm i bee-api

Weekly Downloads

10

Version

1.0.9

License

ISC

Unpacked Size

7.92 kB

Total Files

9

Last publish

Collaborators

  • nemijah