@qgisk/simple-reddit-client
v0.1.0
Published
Simple reddit posts client
Downloads
11
Readme
simple-reddit-client
Install
npm i @qgisk/simple-reddit-client
Usage
import fetch from 'cross-fetch'
import RedditClient from '@qgisk/simple-reddit-client'
const Client = new RedditClient({allowNSFW: false, imagesOnly: false, ignoreGiphy: false, limit: 25}, fetch)
const getPicsInfo = await Client.getInfo({page: 'pics', type: 'r'})
const getPictures = await Client.getPosts({pages: 'pics', type: 'r', allowNSFW: false, imagesOnly: true, ignoreGiphy: true, limit: 25, sortType: 'hot'}) // Also accepts after, for pagination
console.log(getPicsInfo, getPictures)
MIT Demian