Wondering what’s next for npm?Check out our public roadmap! »

    reddits-api
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.7 • Public • Published

    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
    })

    Install

    npm i reddits-api

    DownloadsWeekly Downloads

    2

    Version

    1.3.7

    License

    ISC

    Unpacked Size

    29.5 kB

    Total Files

    13

    Last publish

    Collaborators

    • avatar