reddit-with-headers
v1.0.1
Published
Simple Reddit API client (with headers)
Downloads
13
Maintainers
Readme
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.