Coder Social home page Coder Social logo

wallpaperapi's Introduction

Desktop Anime Wallpaper API Documentation

LIVE LINK: https://ritiin0204.pythonanywhere.com/

Table of Contents

Index

This endpoint provides a list of available API endpoints with their descriptions and links.

Endpoint:

  • URL: /
  • Method: GET

Get Wallpaper

This endpoint retrieves wallpapers based on the provided search criteria or randomly.

Endpoint:

  • URL: /api/wallpapers/name
  • Method: GET
  • Description: Get wallpaper by character name

Parameters:

  • <name> (required): The name of the wallpaper to search for. It can also be set to "random" to get a random wallpaper.

Query Parameters:

  • 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.

Successful Response:

  • 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.

Error Responses:

  • Status Code: 400 (Bad Request)
  • Body: A JSON object with an error field indicating the error message.

Examples:

  1. Retrieve a wallpaper by name:

    • URL: /api/wallpapers/nature
    • Method: GET
    • Response:
      [
          {
              "title": "Nature Wallpaper",
              "url": "https://example.com/nature.jpg"
          }
      ]
  2. Retrieve a random wallpaper:

    • URL: /api/wallpapers/random
    • Method: GET
    • Response:
      [
          {
              "title": "Random Wallpaper",
              "url": "https://example.com/random.jpg"
          }
      ]
  3. 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"
          }
          // ...
      ]

Footer

APIs are build by scraping Wallhaven.

Developed by @Ritin Tiwari.

wallpaperapi's People

Contributors

ritin0204 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.