SuperLangdon / azukisan-api

The Azukisan API is a simple open-source project that provides a web API for randomly fetching adorable Azukisan images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azukisan API - a simple web API for randomly fetching adorable Azukisan images

EN | 简体中文

Introduction

"Siamese Cat Azuki Is the Center of the World" (シャム猫あずきさんは世界の中心) is a work created by the Japanese manga artist Nobeko. In the story, Azukisan, the Siamese cat, is the author's pet, and it often acts spoiled towards its owner, likes to monopolize attention, and even gets jealous of others. Azukisan's behavior often leads to hilarious events, and the manga includes its wonderful and adorable actions, such as liking rain but not baths, liking grilled saury fish but not eating canned saury for cats, and so on. This work is deeply loved by cat enthusiasts, and it has inspired a lot of derivative content and fan creations revolving around the character "Siamese Cat Azuki."

World Revolves Around Cats: Azuki-san, the Siamese Cat, is the Center of the World

This API is based on these works.

Copyright

The images used in this API are sourced from the work "Siamese Cat Azuki Is the Center of the World" (もっとシャム猫あずきさんは世界の中心) created by the Japanese manga artist Nobeko, along with its fan creations. The copyright for the original work and its related fan creations belongs to Nobeko and the relevant parties involved in the fan creations.

Purpose

When you request this API, it will randomly return a picture related to Azuki-san, the Siamese cat.

Basic Information

Base URL: https://api.example.com/azukisan

Request Method: GET

Response Format: JSON

Parameters

Field Description
type 302 (default)
json (supports CORS)
site ⚠️Under development, support not yet completed.
size large (large-sized image, resolution 500*500 and above)
small (small-sized image, resolution 500*500 and above)
all (all) - (default)
proxy 1 (use reverse proxy) - (default)
0 (302 returns the source link)
tag No default value
Filter images by specified categories.
⚠️Under development, support not yet completed.

Error Handling

When an API request fails, it will return the appropriate HTTP status code and error message.

HTTP Status Code Error Message
400 Invalid request or missing required parameters.
404 The requested resource does not exist.
500 The server encountered an error.

Response Example

import requests

base_url = "https://api.example.com/azukisan"

# Set request parameters
params = {
    "type": "302",
    "size": "large",
    "proxy": "1",
    "tag": ""
}

# Send a GET request
response = requests.get(base_url, params=params)

# Get JSON response content
json_data = response.json()

# Handle the returned JSON data
print(json_data)

About

The Azukisan API is a simple open-source project that provides a web API for randomly fetching adorable Azukisan images.