Normal API Response - Serena1432/Touwa GitHub Wiki
This page will explain the normal API response of the Touwa API.
First Notes
- All of the requests will be made using the
GET
method. POST
or any other method is not allowed.
- All of the API response will be returned in JSON format with the
Content-Type: application/json; charset=utf-8
header.
- No headers are required while sending requests to this API. Authorization will also NOT be implemented in this API.
HTTP Responses
Code |
Explanation |
200 (OK) |
The request was successful. |
400 (Bad Request) |
You made an invalid request. |
404 (Not Found) |
Cannot find the resources depended on your request (for example, cannot find a comic in HentaiVN with your given ID) |
500 (Internal Server Error) |
Something bad happened in the Touwa API. Please report this issue in the repository issues part. |
503 (Service Unavailable) |
Something bad happened in the HentaiVN website. |
Normal error responses
{
"success": false,
"error_code": 404,
"message": "The target website returned a 404 error.",
"url": "",
"documentation_url": "https://www.github.com/LilShieru/Touwa/wiki"
}
Object explanation:
Name |
Type |
Description |
success |
boolean |
Whether the request was successful or not. |
error_code |
integer |
The error code. |
message |
string |
Further error explaination. |
url |
string |
The target URL from HentaiVN website. |
documentation_url |
string |
The documentation URL. |
Normal success response
{
"success": true,
"url": "https://hentaivn.tv",
"ping": "1690ms",
"data": {}
}
Object explanation:
Name |
Type |
Description |
success |
boolean |
Whether the request was successful or not. |
url |
string |
The target URL from HentaiVN website. |
ping |
string |
The response time between the server and the website. |
data |
object or array |
The parsed data (will be explained further in a specific endpoint) |