Docs - Hitomi-Downloader-extension/api GitHub Wiki
Endpoint
The api endpoint is described here.
/ping
This endpoint is used to check if the server is running.
Method
GET
Response
200
{"status": "ok"}
/valid_url
This endpoint checks if the url is valid for Hitomi Downloader and returns the type if it is valid.
Method
POST
Body
{"gal_num": "1"}
Response
200
{"type": ["hitomi"]}
400
Returned when invalid.
{"error": "not_valid"}
Request is wrong
{"error": "bad_request"}
/download
This endpoint requests a download into Hitomi Downloader.
Method
POST
Body
{"gal_num": "1"}
Response
200
{"status": "ok"}
/cookie
This endpoint loads the received cookie value into Hitomi Downloader.
Method
POST
Body
Other arguments may be entered.
reference: https://2.python-requests.org/en/master/api/#requests.cookies.RequestsCookieJar
{
"cookies": [
{
"name": "value",
"value": "value",
"domain": "value",
"expires": 0
}
]
}
Response
200
{"status": "ok"}
400
If there is no one of 'domain', 'name', or 'value'
{"error": "['domain', 'name', 'value'] is required arguments"}
Request is wrong
{"error": "bad_request"}