Reddit API Image Getter

Install

npm i reddit-api-image-getter --save

Open Source

Check out the source code on GitHub and dig in a little for yourself.

Example

const path = require ( ' path ' ) redditApiImageGetter = require ( ' reddit-api-image-getter ' ) getter = new redditApiImageGetter ( ) getter . getHotImagesOfSubReddit ( ' ProgrammerHumor ' ) . then ( function ( result ) { for ( imageEntry of result ) { const targetDirectory = path . resolve ( __dirname , ' images ' , ' hot ' ) ; getter . saveRedditImageEntryToDisk ( imageEntry , targetDirectory ) ; } } ) . catch ( function ( error ) { console . log ( error ) } ) getter . getTopImagesOfSubReddit ( ' ProgrammerHumor ' ) . then ( function ( result ) { for ( imageEntry of result ) { const targetDirectory = path . resolve ( __dirname , ' images ' , ' top ' ) ; getter . saveRedditImageEntryToDisk ( imageEntry , targetDirectory ) ; } } ) . catch ( function ( error ) { console . log ( error ) } )

Example with Telegram Bot

https://www.simon-neutert.de/2020/telegraf-bot-nodejs/

Inspiration

go crazy, send the pictures to your telegram via a bot (using a bot) and make your day a happy day 🎉