Skip to content

andrewc89/rednode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

rednode

Usage

Initial

  var Reddit = require("./reddit");
  var reddit = new Reddit();
  reddit.setUserAgent("<your user agent>");
  reddit.login("username", "password", function () {
    // do something...
  });

Subreddit

  reddit.r("redditdev", function (body) {
    console.log(body);
  });
  reddit.r("redditdev").top().exec(function (body) {
    console.log(body);
  });

Posting

  reddit.postLink("redditdev", "Node.js reddit api wrapper", "https://github.com/theyshookhands/rednode", function (body) {
    console.log(body);
  });
  reddit.postSelf("redditdev", "My experience with rednode", "rednode is the best!", function (body) {
    console.log(body);
  });

Dependencies

https://github.com/mikeal/request/

About

a node wrapper for the reddit API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published