1.0.8 • Published 3 years ago

simple-reddit v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

simple-reddit

Simple client for the reddit public api. (No auth needed)

Get it from npm

npm i simple-reddit --save

Import

const Reddit = require("simple-reddit");

or just import individual functions.

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

Usage

Basic examples:

Get top post from reddit.

RedditSimple.TopPost(options).then(res => {
    console.log(res);
})

Options

There are 4 options that you can pass.

NameValueDescriptionDefault
subredditname of subredditSubreddit to fetch the post.r/all
countNumber of posts to retrieveRetrieves n number of posts.1 (max:100)
is_memetrue/falseIf you want to get a meme. Ignores subreddit option if true.false
fulldatatrue/falseRetrieve essential post data or everything reddit has to offer.false
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago