Socket
Socket
Sign inDemoInstall

@kindl3d/reddit.js

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @kindl3d/reddit.js

Retrive random reddit posts


Version published
Weekly downloads
1
Maintainers
1
Install size
399 kB
Created
Weekly downloads
 

Readme

Source

RedditJS

Retrieve stories instantly from reddit.

Downloads

Installation

npm install --save @kindl3d/reddit.js

Usage

Reddit.js is fairly simple to use

To get the post object:

const { reddit } = require('@kindl3d/reddit.js');

reddit("entitledparents").then(data =>{
	console.log(data);
})

This outputs

{
  title: "Post title",
  text: "Post text",
  flairText: 'Flair text',
  author: 'Author',
  subreddit: 'r/example',
  url: 'https://www.reddit.com/r/emample/comments/xxxxxxx/xxxxxxxxxxx',
  permalink: 'https://www.reddit.com/r/emample/comments/xxxxxxx/xxxxxxxxxxx',
  created: '2021-01-23 00:02:34.000',
  created_utc: '2021-01-22 16:02:34.000',
  nsfw: false
}```

Have fun with this simple Reddit API wrapper, open an issue if you discover any bugs :)

Keywords

FAQs

Last updated on 22 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc