Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.
Ryu JuHeon edited this page Jun 2, 2021 · 1 revision

Api

About

Get the current state of Heliotrope.

Path

/about /v4/api path is not required

Query Parameters

json bool Optional

Receive response in json format.

GET

Response

200
html
{
    "last_checked_time": "(UTC) 2021-06-02 12:57:01.312032",
    "last_mirrored_time": "(UTC) 2021-06-02 11:57:01.254476",
    "new_item": "3",
    "server_status": "idle" // mirroring
}

Proxy

Show the image by proxying it

Path

/proxy

Path Parameters

shuffled_url string Required

URLs shuffled by that rule

GET

Response

200
image_bytes (chucked)
400
{
    "status": 400,
    "message": "bad_request"
}

Count

Shows the most requested works after sorting

Path

/count

Headers

"hiyobot" string Required

GET

Response

200
{
    "total": 1,
    "list": [
        {
            "index": 1570712,
            "title": "title",
            "count": 1
        }
    ],
    "status": 200
}
404
{
    "status": 404, 
    "message": "not_found"
}
403
{
    "status": 403,
    "message": "not_authorized"
}

POST

Body

{
    "index": 1570712
}

Response

200
{
    "status": 200
}
400
{
    "status": 400,
    "message": "bad_request"
}
403
{
    "status": 403,
    "message": "not_authorized"
}