@ipmanlk/reddit-simple

2.2.1 • Public • Published

reddit-simple

Simple wrapper over Reddit public API (no overhead, no auth token)

Get it from npm

npm i reddit-simple --save

or Clone this repo

Import

const { RedditSimple } = require("reddit-simple");

Usage

Get top post from r/ProgrammerHumor

RedditSimple.TopPost("programmerHumor").then(res => {
    console.log(res);
}).catch(e => {
    console.log(e);
});

Get Random Post from r/freefolk

RedditSimple.RandomPost("freefolk").then(res => {
    console.log(res);
}).catch(e => {
    console.log(e);
});

Get List of Subreddits

RedditSimple.SubReddit().then(res => {
    console.log(res);
}).catch(e => {
    console.log(e);
});

Spy on Redditor

RedditSimple.SpyRedditor("dashuser").then(res => {
    console.log(res);
}).catch(e => {
    console.log(e);
});

Package Sidebar

Install

npm i @ipmanlk/reddit-simple

Weekly Downloads

1

Version

2.2.1

License

MIT

Unpacked Size

7.08 kB

Total Files

9

Last publish

Collaborators

  • ipmanlk