1.2.6 • Published 3 years ago

better-redddit v1.2.6

Weekly downloads
7
License
UNLICENSED
Repository
github
Last release
3 years ago

better-redddit

Simple Reddit API, no authentication needed! All credits go to normanlol for the original code, I just changed it to promises and used a different web scraper. Link to original https://github.com/normanlol/redddit and npm https://www.npmjs.com/package/redddit

example code

const r = require('better-redddit');

r.top_posts("memes", 10).then(results => {
	const post = results[Math.floor(Math.random() * results.length)].data.permalink;
	console.log(post);
	r.get_post(post).then(post_info => {
		console.log(post_info);
	});
});

r.search('memes', 10).then(results => {
	console.log(results);
});

r.get_url('r/PewdiepieSubmissions/comments/kseegx/im_bad_at_titles/').then(result => {
	console.log(result);
});
1.2.6

3 years ago

1.2.4

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago