🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

cheatwrap

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheatwrap

Wrapper around snoowrap allowing the use of multiple API keys to bypass the limitation of a single key

1.0.1
latest
Source
npm
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

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()

Keywords

reddit

FAQs

Package last updated on 21 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts