An easy to use module to fetch random posts from any subreddit
  • JavaScript 100%
Find a file
2020-04-10 10:58:35 +02:00
.eslintrc.js Initial commit 2019-01-24 12:16:57 +01:00
.gitattributes Initial commit 2019-01-24 12:16:57 +01:00
.gitignore Initial commit 2019-01-24 12:16:57 +01:00
.travis.yml Add travis 2019-01-24 11:26:47 +00:00
index.js Initial commit 2019-01-24 12:16:57 +01:00
LICENSE Initial commit 2019-01-24 12:16:57 +01:00
package-lock.json Bump acorn from 6.0.5 to 6.4.1 2020-04-10 08:57:55 +00:00
package.json Initial commit 2019-01-24 12:16:57 +01:00
README.md Update README.md 2019-01-24 12:47:41 +00:00
tests.js Initial commit 2019-01-24 12:16:57 +01:00

Musakui build status

An easy to use module to fetch random posts from any subreddit

Install

$ npm install musakui

Usage

const musakui = require('musakui');

musakui('aww')
  .then(result => console.log(result))
  .catch(error => console.log(error));

Example result

{
  "title": "Example reddit post",
  "content": "",
  "author": "luca",
  "upvotes": 3,
  "downvotes": 2,
  "comments": 1,
  "nsfw": false,
  "reddit_url": "https://reddit.com/r/.../.../",
  "media_url": "https://i.redd.it/.../"
}

Please note that media_url won't be present if the post doesn't contain any kind of media.