Skip to content

the-pat/reddit-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reddit-image

Grabs a random image from reddit

Install

npm install --save reddit-image

Usage

const ri = require('reddit-image');

console.log(await ri.get('EarthPorn'));

API

.get(subreddit, [options])

Returns a promise for the path of the recently downloaded wallpaper.

subreddit

Type: string

The subreddit to download the image from.

options

Type: object

dir

Type: string

Default: .

sort

Type: string

Values: hot new top controversial

Default: hot

from

Type: string

Values: hour day week month year all

Default: all

score

Type: int

Default: 100

limit

Type: int

Default: 5

over18

Type: bool

Default: false

scale

Type: object

width

Type: int

Default: 1920

height

Type: int

Default: 1080

Related

License

MIT © Patrick Tone

About

Grabs a random image from reddit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published