1.0.1 • Published 4 years ago

reddit-with-headers v1.0.1

Weekly downloads
-
License
See LICENSE.md
Repository
github
Last release
4 years ago

Simple Reddit API client (now with the headers)

This api was forked from the original created by Feross

All i Have done is change helper to return both the body and response, so you can get the headers about rate limiting from reddit.

Example:

const res = reddit.get('/r/Programming/hot', {
	g: 'US',
	count: 0,
	limit: 25,
	show: ''
});

console.log(res.headers);
console.log(res.body);

//headers print the headers, including rate limiting info
//body prints the json response from the reddit api

License

The MIT License. Copyright (c) Marcellus Mohanna.