Socket
Socket
Sign inDemoInstall

reddit-wrapper

Package Overview
Dependencies
71
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reddit-wrapper

A wrapper around the Reddit API


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
13.7 MB
Created
Weekly downloads
 

Readme

Source

# Reddit-Wrapper

A very simple wrapper around Reddit's API, built for an on going side project. Currently has a very, very slim API, but as I need it more I'll develop out the API.

Please don't use or rely on this yet - it's still very young and I'm currently constantly tweaking.

Usage

Primary use at the moment is to get listings:

var wrap = new RedditWrapper();
wrap.listing({
    subReddit: 'vim', // leave out to get posts from home page
    category: 'new' // leave out to get 'hot' posts (usually what you want)
}, function(err, resp, body) {
    // body is the JSON response, parsed into a json object
});

It also does caching, although that's only supported through MongoDB right now.

Todo

There's lots missing here. Most importantly:

  • all listings just return the first set. Need to be able to page through content
  • make the methods return promises, as an alternative to callbacks.

FAQs

Last updated on 14 Jul 2014

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