New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jawfr

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jawfr

Reddit API Wrapper, takes care of rate limiting and fulfills interactions by promises

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

JAWFR - JavaScript API Wrapper For Reddit

  • Everything is done through promises
  • Autorefreshes the token
  • Keeps to the rate limits
  • is for personal scripts only (so far)
var jawfr = require('JAWFR')();

jawfr.connect(user_agent, client_id, secret, username, password)
	.then(data) {
		// data is the inital token response

		// do stuff that needs connection

	}
	.catch(function(err) {
		console.log("connection error");
		console.log(err);
	});

Any kind of list is returned as an array of objects, with whatever other interesting properties tack on. Thus, they can be iterated nicely with for..of loops, and you can get eveything with a for..in.

User

var u = r.getUser("spez");
u.moderates()
	.then(data) {
		console.log(spez moderates:);
		console.log(data);
	}
	.catch(err) {
		console.log(err);
	}

Subreddits

var s = r.getSubreddit("pics");
s.getLinks({sort:hot})
	.then(data) {
		console.log(data);
	}
	.catch(err) {
		console.log(err);
	}

Keywords

FAQs

Package last updated on 01 Jun 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc