yarn add wallhaven
const Wallhaven = require('wallhaven')
const api = new Wallhaven()
api.search('attack on titans')
.then(result => {
console.log(result)
// => { totalPages: 29, images: [] }
})
A micro-service based on this module: https://wallhaven.now.sh
Examples:
- Search: https://wallhaven.now.sh/search?keyword=attack%20on%20titans
- Details: https://wallhaven.now.sh/details/482373
- Random: https://wallhaven.now.sh/random?keyword=eriri
Search wallpapers by given keyword.
Type: Array
Default: ['general', 'anime', 'people']
Type: Number
Default: 1
Type: string
Default: relevance
Value: one of relevance
random
date_added
views
favorites
Type: boolean
Default: false
Show NSFW (not safe for work) result.
Type: boolean
Default: false
Show sketchy wallpapers only.
Get the details of a wallpaper by image id.
Type: Number
Image ID.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
wallhaven © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoist.moe · GitHub @egoist · Twitter @_egoistlily