Skip to content

Marcellus97/reddit-with-headers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple Reddit API client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%