reddits-api
v1.3.7
Published
A little reddit's API
Downloads
2
Maintainers
Readme
Reddit's manual API:
Fetch some user's data:
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
})
Fetch subreddit posts:
const reddit = require("reddits-api")
reddit.subPosts("SUBREDDIT_NAME_HERE").then((subPosts) => {
console.log(subPosts)
}).catch((err) => {
throw err
})