cheatwrap
v1.0.1
Published
Wrapper around snoowrap allowing the use of multiple API keys to bypass the limitation of a single key
Downloads
25
Readme
CheatWrap
Wrapper around snoowrap allowing the use of multiple API keys to bypass the limitation of a single key
Installation
npm i cheatwrap
Example
import CheatWrap from "./index"
import Snoowrap from "snoowrap"
const credentials = [
{
userAgent: "graph-from-reddit",
clientId: process.env.ID,
clientSecret: process.env.SECRET,
username: process.env.USERNAME,
password: process.env.PASSWORD,
},
]
const getSweetCreatures = async (r: Snoowrap) => {
return await (await r.getSubreddit("aww").getHot()).fetchAll()
}
const main = async () => {
const r = new CheatWrap(credentials)
await r.run(getSweetCreatures)
}
main()