https://github.com/lilactown/reddit_headlines
Get headlines from a subreddit
https://github.com/lilactown/reddit_headlines
Last synced: 8 months ago
JSON representation
Get headlines from a subreddit
- Host: GitHub
- URL: https://github.com/lilactown/reddit_headlines
- Owner: lilactown
- Created: 2015-04-27T21:29:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-28T15:33:21.000Z (over 10 years ago)
- Last Synced: 2025-02-15T18:48:34.763Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 404 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Reddit Headlines
===============A node module and command line application for getting headlines from a subreddit. Requires ES6.
###Usage
Command line (piped to stdout):
```bash
iojs main.js # count is the number of posts to get in 100s (1 = 100, 2 = 200...)
```As a module:
```javascript
let reddHead = require('reddit_headlines');reddHead.get('askreddit', { limit: 100 }, function (body) { // get the first 100 posts from /r/AskReddit
for (let post of body.data.children) {
console.log(post.data.title);
}
}