LIVE LINK: https://ritiin0204.pythonanywhere.com/
This endpoint provides a list of available API endpoints with their descriptions and links.
- URL: /
- Method: GET
This endpoint retrieves wallpapers based on the provided search criteria or randomly.
- URL: /api/wallpapers/name
- Method: GET
- Description: Get wallpaper by character name
<name>
(required): The name of the wallpaper to search for. It can also be set to "random" to get a random wallpaper.
limit
(optional): The maximum number of wallpapers to retrieve. Default value is 1.width
(optional): The desired width of the wallpaper in pixels. Default value is 1920.height
(optional): The desired height of the wallpaper in pixels. Default value is 1080.
- Status Code: 200 (OK)
- Body: A JSON array of wallpaper objects. Each object contains the following fields:
name
: The title of the wallpaper.url
: The URL of the wallpaper image.
- Status Code: 400 (Bad Request)
- Body: A JSON object with an error field indicating the error message.
-
Retrieve a wallpaper by name:
- URL: /api/wallpapers/nature
- Method: GET
- Response:
[ { "title": "Nature Wallpaper", "url": "https://example.com/nature.jpg" } ]
-
Retrieve a random wallpaper:
- URL: /api/wallpapers/random
- Method: GET
- Response:
[ { "title": "Random Wallpaper", "url": "https://example.com/random.jpg" } ]
-
Retrieve multiple wallpapers by name and set limit, width, and height:
- URL: /api/wallpapers/cars
- Get Data Parameters:
- limit: 5
- width: 1280
- height: 720
- Method: GET
- Response:
[ { "title": "Car Wallpaper 1", "url": "https://example.com/car1.jpg" }, { "title": "Car Wallpaper 2", "url": "https://example.com/car2.jpg" } // ... ]
APIs are build by scraping Wallhaven.
Developed by @Ritin Tiwari.