Wallpaper API Documentation

This API provides access to the wallpaper images in the /wp folder.

GET /api/images.json

Returns an array of all image IDs.

Response

[
  "image1.jpg",
  "image2.png",
  ...
]

GET /api/images/{id}.json

Returns information about a specific image by ID.

Parameters

Name Type Description
id string The ID of the image (filename)

Response

{
  "id": "image1.jpg",
  "path": "wp/image1.jpg",
  "type": "jpg"
}

GET /api/images/{id}.html

Redirects to the actual image file.

Parameters

Name Type Description
id string The ID of the image (filename)

GET /api/random/index.html

Returns a random image ID.

Response

{
  "id": "image1.jpg"
}

GET /api/images-data.json

Returns detailed information about all images, including Google Drive paths and thumbnails.

Response

[
  {
    "id": "005TN27O78.png",
    "path": "https://drive.google.com/uc?export=view&id=19jXH2CaqFYWF0yfStTxFKHSnRBVKPRbI",
    "type": "png",
    "source": "google-drive",
    "driveFileId": "19jXH2CaqFYWF0yfStTxFKHSnRBVKPRbI",
    "localPath": "wp/005TN27O78.png",
    "thumbnailUrl": "https://drive.google.com/thumbnail?id=19jXH2CaqFYWF0yfStTxFKHSnRBVKPRbI&sz=w2000"
  },
  ...
]

Example Usage

Here's an example of how to use the API with JavaScript:

// Get all image IDs
fetch('/api/images.json')
  .then(response => response.json())
  .then(images => console.log(images));

// Get a specific image by ID
fetch('/api/images/image1.jpg.json')
  .then(response => response.json())
  .then(imageData => console.log(imageData));

// Get a random image
fetch('/api/random/index.html')
  .then(response => response.json())
  .then(randomImage => console.log(randomImage));

// Get detailed information about all images
fetch('/api/images-data.json')
  .then(response => response.json())
  .then(imagesData => console.log(imagesData));

Back to Wallpaper Viewer