const reddit = require("reddits-api")
reddit.user("USERNAME_HERE").then((user) => {
console.log(user)
}).catch((err) => {
throw err
})
Fetch some user's comments data:
const reddit = require("reddits-api")
reddit.commentsFrom("USERNAME_HERE").then((comments) => {
console.log(comments)
}).catch((err) => {
throw err
})
Fetch some user's posts data:
const reddit = require("reddits-api")
reddit.postsFrom("USERNAME_HERE").then((posts) => {
console.log(posts)
}).catch((err) => {
throw err
})
Fetch Reddit's trends data:
const reddit = require("reddits-api")
reddit.trends().then((trends) => {
console.log(trends)
}).catch((err) => {
throw err
})
const reddit = require("reddits-api")
reddit.subPosts("SUBREDDIT_NAME_HERE").then((subPosts) => {
console.log(subPosts)
}).catch((err) => {
throw err
})