1.0.10 • Published 5 years ago

reddit-event v1.0.10

Weekly downloads
22
License
Apache-2.0
Repository
-
Last release
5 years ago

reddit-event

Get new posts of reddit with a event

itworkwhy

Installation

$ npm i reddit-event

Usage

const Reddit = require('reddit-event');
const reddit = new Reddit();

.setLogging(boolean)

Logs when the package is looking through the subreddits, default: false | Returns: RedditClient

.setMinutes(number)

Sets the number of minutes to look for new posts, default: 1 | Returns: Promise\

.sub.add(string)

Adds a subreddit to be watched | Returns: Promise\

.sub.bulk.add(Array\)

Adds multiple subreddits to be watched | Returns: Promise\

.sub.remove(string)

Removes a subreddit from being watched | Returns: Promise\

.sub.bulk.remove(Array\)

Removes multiple subreddits to be watched | Returns: Promise\

.sub.list()

Lists all subreddits you have being watched | Returns: Array\

.on(event, callback)

Listen an event | Returns: RedditClient

.start()

This starts the operation to look for new posts | Returns: Promise\

Events

ready

Is emitted once the start function is called. | Callback: void

error

Is emitted once the package has an error | Callback: string

post

Is emitted once new posts from that subreddit is "new" | Callback: (string, Array)

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago