Goblenus / WallhavenApi

Wallhaven API for Python
MIT License
27 stars 9 forks source link
api wallhaven

Wallhaven API for Python

pipeline status Coverage Status codecov Scrutinizer Code Quality Dependency Status

Feel free to add an issue.

Description

Implementation of https://wallhaven.cc/help/api (the official one)

Dependencies

# pip install -r requirements.txt

Quick Documentation

Import WallhavenApi package:

import wallhavenapi

Initialize WallhavenApi:

wallhaven_api= wallhavenapi.WallhavenApiV1()

If you have an account on Wallhaven, you can use api key to access all available wallpapers:

wallhaven_api = wallhavenapi.WallhavenApiV1(api_key="some_api_key")

Methods

WallhavenApiV1

WallhavenApiV1.search - Accessing Wallpaper information

WallhavenApiV1.is_walpaper_exists - Check wallpaper existence by id

WallhavenApiV1.download_wallpaper - Download wallpaper to file (or get data) by id

WallhavenApiV1.tag - Get tag information

WallhavenApiV1.settings - Get user settings

It works only if api_key is set

WallhavenApiV1.collections - get collections by user name

WallhavenApiV1.collection_wallpapers - get wallpapers by user collection id

WallhavenApiV1.my_collections - get collections of api_key user

It works only if api_key is set