reddit-client
v3.0.0
Published
makes consuming the reddit api easy, but not too easy
Downloads
29
Readme
#node-reddit
makes consuming the reddit api easy, but not too easy
this doesn't aim to be PRAW, it just handles the most tedious stuff (session cookie, modhash, urlencoding, response parsing) so you don't have to keep track of it yourself.
##Usage
src/examples/inbox-count.js:
'use strict';
import { Session } from '../../';
import { coroutine } from 'bluebird';
coroutine(function*() {
let session = new Session();
yield session.authenticate({
user: process.env.USER,
passwd: process.env.PASSWD
});
let response = yield session.request('/api/me.json');
console.log(`You have ${response.data.inbox_count} new messages`);
})().done();
##Documentation
coming soon. hopefully.