bee-api

reddit api


Keywords
reddit, api
License
ISC
Install
npm install bee-api@1.0.9

Documentation

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

  • Added a nicer and more detailed readme
  • Added talbe of contents
  • Added contact infomation

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

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