mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
update docs: markdown fix?
This commit is contained in:
parent
a96ab17d25
commit
c8ff6648e0
@ -23,107 +23,7 @@ class Controller extends BaseController
|
||||
* @OA\Info(
|
||||
* version="4.0.0",
|
||||
* title="Jikan API",
|
||||
* description="[Jikan](https://jikan.moe) is an **Unofficial** MyAnimeList API.
|
||||
|
||||
## Information
|
||||
It scrapes the website to satisfy the need for a complete API - which MyAnimeList lacks.
|
||||
|
||||
⚡ Jikan is powered by it's awesome backers - 🙏 [Become a backer](https://www.patreon.com/jikan)
|
||||
|
||||
### Rate Limiting
|
||||
|
||||
| Duration | Requests |
|
||||
|----|----|
|
||||
| Daily | **Unlimited** |
|
||||
| Per Minute | 60 requests |
|
||||
| Per Second | 3 requests |
|
||||
|
||||
|
||||
### JSON Notes
|
||||
- Any property (except arrays or objects) whose value does not exist or is undetermined, will be `null`.
|
||||
- Any array or object property whose value does not exist or is undetermined, will be `null`.
|
||||
- Any `score` property whose value does not exist or is undetermined, will be `0`.
|
||||
- All dates and timestamps are returned in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format and in UTC timezone
|
||||
|
||||
### Caching
|
||||
By **CACHING**, we refer to the data parsed from MyAnimeList which is stored temporarily on our servers to provide better API performance.
|
||||
|
||||
All requests, by default are cached for **24 hours** except the following endpoints which have their own unique cache **Time To Live**.
|
||||
|
||||
| Request | TTL |
|
||||
| ---- | ---- |
|
||||
| All (Default) | 24 hours |
|
||||
| User Anime/Manga List | 5 minutes |
|
||||
|
||||
|
||||
The following response headers will detail cache information.
|
||||
|
||||
| Header | Remarks |
|
||||
| ---- | ---- |
|
||||
| `Expires` | Expiry unix timestamp |
|
||||
|
||||
|
||||
### Allowed HTTP(s) requests
|
||||
|
||||
**Jikan REST API does not provide authenticated requests for MyAnimeList.** This means you can not use it to update your anime/manga list.
|
||||
Only GET requests are supported which return READ-ONLY data.
|
||||
|
||||
### HTTP Responses
|
||||
|
||||
| HTTP Status | Remarks |
|
||||
| ---- | ---- |
|
||||
| `200 - OK` | The request was successful |
|
||||
| `304 - Not Modified` | You have the latest data (Cache Validation response) |
|
||||
| `400 - Bad Request` | You've made an invalid request. Recheck documentation |
|
||||
| `404 - Not Found` | The resource was not found or MyAnimeList responded with a `404` |
|
||||
| `405 - Method Not Allowed` | Requested Method is not supported for resource. Only `GET` requests are allowed |
|
||||
| `429 - Too Many Request` | You are being rate limited by Jikan or MyAnimeList is rate-limiting our servers (specified in the error response) |
|
||||
| `500 - Internal Server Error` | Something is not working on our end. If you see an error response with a `report_url` URL, please click on it to open an auto-generated GitHub issue |
|
||||
| `503 - Service Unavailable` | The service has broke. |
|
||||
|
||||
|
||||
### JSON Error Response
|
||||
|
||||
```json
|
||||
{
|
||||
'status': 404,
|
||||
'type': 'BadResponseException',
|
||||
'message': 'Resource does not exist',
|
||||
'error': 'Something Happened',
|
||||
'report_url': 'https://github.com...'
|
||||
}
|
||||
```
|
||||
|
||||
| Property | Remarks |
|
||||
| ---- | ---- |
|
||||
| `status` | Returned HTTP Status Code |
|
||||
| `type` | `Exception` generated from the API |
|
||||
| `message` | Human-readable error message |
|
||||
| `error` | Error response and trace from the API |
|
||||
| `report_url` | Clicking this would redirect you to a generated GitHub issue. ℹ It's only returned on a parser error. |
|
||||
|
||||
|
||||
### Cache Validation
|
||||
|
||||
- All requests return a `ETag` header which is an MD5 hash of the response
|
||||
- You can use this hash to verify if there's new or updated content by suppliying it as the value for the `If-None-Match` in your next request header
|
||||
- You will get a HTTP `304 - Not Modified` response if the content has not changed
|
||||
- If the content has changed, you'll get a HTTP `200 - OK` response with the updated JSON response
|
||||
|
||||

|
||||
|
||||
### Disclaimer
|
||||
|
||||
- Jikan is not affiliated with MyAnimeList.net.
|
||||
- Jikan is a free, open-source API. Please use it responsibly.
|
||||
|
||||
----
|
||||
|
||||
By using the API, you are agreeing to Jikan's [terms of use](https://jikan.moe/terms) policy.
|
||||
|
||||
[v3 Documentation](https://jikan.docs.apiary.io/) - [Wrappers/SDKs](https://github.com/jikan-me/jikan#wrappers) - [Report an issue](https://github.com/jikan-me/jikan-rest/issues/new)
|
||||
[Host your own server](https://github.com/jikan-me/jikan-rest)
|
||||
",
|
||||
* description=API_DESCRIPTION,
|
||||
* termsOfService="https://jikan.moe/terms",
|
||||
*
|
||||
* @OA\Contact(
|
||||
|
@ -200,5 +200,105 @@ return [
|
||||
*/
|
||||
'constants' => [
|
||||
// 'SWAGGER_LUME_CONST_HOST' => env('SWAGGER_LUME_CONST_HOST', 'http://my-default-host.com'),
|
||||
'API_DESCRIPTION' => <<<EOF
|
||||
[Jikan](https://jikan.moe) is an **Unofficial** MyAnimeList API.\n## Information
|
||||
It scrapes the website to satisfy the need for a complete API - which MyAnimeList lacks.
|
||||
|
||||
⚡ Jikan is powered by it's awesome backers - 🙏 [Become a backer](https://www.patreon.com/jikan)
|
||||
|
||||
### Rate Limiting
|
||||
|
||||
| Duration | Requests |
|
||||
|----|----|
|
||||
| Daily | **Unlimited** |
|
||||
| Per Minute | 60 requests |
|
||||
| Per Second | 3 requests |
|
||||
|
||||
|
||||
### JSON Notes
|
||||
- Any property (except arrays or objects) whose value does not exist or is undetermined, will be `null`.
|
||||
- Any array or object property whose value does not exist or is undetermined, will be `null`.
|
||||
- Any `score` property whose value does not exist or is undetermined, will be `0`.
|
||||
- All dates and timestamps are returned in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format and in UTC timezone
|
||||
|
||||
### Caching
|
||||
By **CACHING**, we refer to the data parsed from MyAnimeList which is stored temporarily on our servers to provide better API performance.
|
||||
|
||||
All requests, by default are cached for **24 hours** except the following endpoints which have their own unique cache **Time To Live**.
|
||||
|
||||
| Request | TTL |
|
||||
| ---- | ---- |
|
||||
| All (Default) | 24 hours |
|
||||
| User Anime/Manga List | 5 minutes |
|
||||
|
||||
|
||||
The following response headers will detail cache information.
|
||||
|
||||
| Header | Remarks |
|
||||
| ---- | ---- |
|
||||
| `Expires` | Expiry unix timestamp |
|
||||
|
||||
|
||||
### Allowed HTTP(s) requests
|
||||
|
||||
**Jikan REST API does not provide authenticated requests for MyAnimeList.** This means you can not use it to update your anime/manga list.
|
||||
Only GET requests are supported which return READ-ONLY data.
|
||||
|
||||
### HTTP Responses
|
||||
|
||||
| HTTP Status | Remarks |
|
||||
| ---- | ---- |
|
||||
| `200 - OK` | The request was successful |
|
||||
| `304 - Not Modified` | You have the latest data (Cache Validation response) |
|
||||
| `400 - Bad Request` | You've made an invalid request. Recheck documentation |
|
||||
| `404 - Not Found` | The resource was not found or MyAnimeList responded with a `404` |
|
||||
| `405 - Method Not Allowed` | Requested Method is not supported for resource. Only `GET` requests are allowed |
|
||||
| `429 - Too Many Request` | You are being rate limited by Jikan or MyAnimeList is rate-limiting our servers (specified in the error response) |
|
||||
| `500 - Internal Server Error` | Something is not working on our end. If you see an error response with a `report_url` URL, please click on it to open an auto-generated GitHub issue |
|
||||
| `503 - Service Unavailable` | The service has broke. |
|
||||
|
||||
|
||||
### JSON Error Response
|
||||
|
||||
```json
|
||||
{
|
||||
'status': 404,
|
||||
'type': 'BadResponseException',
|
||||
'message': 'Resource does not exist',
|
||||
'error': 'Something Happened',
|
||||
'report_url': 'https://github.com...'
|
||||
}
|
||||
```
|
||||
|
||||
| Property | Remarks |
|
||||
| ---- | ---- |
|
||||
| `status` | Returned HTTP Status Code |
|
||||
| `type` | `Exception` generated from the API |
|
||||
| `message` | Human-readable error message |
|
||||
| `error` | Error response and trace from the API |
|
||||
| `report_url` | Clicking this would redirect you to a generated GitHub issue. ℹ It's only returned on a parser error. |
|
||||
|
||||
|
||||
### Cache Validation
|
||||
|
||||
- All requests return a `ETag` header which is an MD5 hash of the response
|
||||
- You can use this hash to verify if there's new or updated content by suppliying it as the value for the `If-None-Match` in your next request header
|
||||
- You will get a HTTP `304 - Not Modified` response if the content has not changed
|
||||
- If the content has changed, you'll get a HTTP `200 - OK` response with the updated JSON response
|
||||
|
||||

|
||||
|
||||
### Disclaimer
|
||||
|
||||
- Jikan is not affiliated with MyAnimeList.net.
|
||||
- Jikan is a free, open-source API. Please use it responsibly.
|
||||
|
||||
----
|
||||
|
||||
By using the API, you are agreeing to Jikan's [terms of use](https://jikan.moe/terms) policy.
|
||||
|
||||
[v3 Documentation](https://jikan.docs.apiary.io/) - [Wrappers/SDKs](https://github.com/jikan-me/jikan#wrappers) - [Report an issue](https://github.com/jikan-me/jikan-rest/issues/new)
|
||||
[Host your own server](https://github.com/jikan-me/jikan-rest)
|
||||
EOF,
|
||||
],
|
||||
];
|
||||
|
@ -2,7 +2,7 @@
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Jikan API",
|
||||
"description": "[Jikan](https://jikan.moe) is an **Unofficial** MyAnimeList API.\n\n## Information\n\nIt scrapes the website to satisfy the need for a complete API - which MyAnimeList lacks.\r\n\r\n ⚡ Jikan is powered by it's awesome backers - 🙏 [Become a backer](https://www.patreon.com/jikan)\r\n\r\n ### Rate Limiting\r\n\r\n | Duration | Requests |\r\n |----|----|\r\n | Daily | **Unlimited** |\r\n | Per Minute | 60 requests |\r\n | Per Second | 3 requests |\r\n\r\n\r\n ### JSON Notes\r\n - Any property (except arrays or objects) whose value does not exist or is undetermined, will be `null`.\r\n - Any array or object property whose value does not exist or is undetermined, will be `null`.\r\n - Any `score` property whose value does not exist or is undetermined, will be `0`.\r\n - All dates and timestamps are returned in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format and in UTC timezone\r\n\r\n ### Caching\r\n By **CACHING**, we refer to the data parsed from MyAnimeList which is stored temporarily on our servers to provide better API performance.\r\n\r\n All requests, by default are cached for **24 hours** except the following endpoints which have their own unique cache **Time To Live**.\r\n\r\n | Request | TTL |\r\n | ---- | ---- |\r\n | All (Default) | 24 hours |\r\n | User Anime/Manga List | 5 minutes |\r\n\r\n\r\n The following response headers will detail cache information.\r\n\r\n | Header | Remarks |\r\n | ---- | ---- |\r\n | `Expires` | Expiry unix timestamp |\r\n\r\n\r\n ### Allowed HTTP(s) requests\r\n\r\n **Jikan REST API does not provide authenticated requests for MyAnimeList.** This means you can not use it to update your anime/manga list.\r\n Only GET requests are supported which return READ-ONLY data.\r\n\r\n ### HTTP Responses\r\n\r\n | HTTP Status | Remarks |\r\n | ---- | ---- |\r\n | `200 - OK` | The request was successful |\r\n | `304 - Not Modified` | You have the latest data (Cache Validation response) |\r\n | `400 - Bad Request` | You've made an invalid request. Recheck documentation |\r\n | `404 - Not Found` | The resource was not found or MyAnimeList responded with a `404` |\r\n | `405 - Method Not Allowed` | Requested Method is not supported for resource. Only `GET` requests are allowed |\r\n | `429 - Too Many Request` | You are being rate limited by Jikan or MyAnimeList is rate-limiting our servers (specified in the error response) |\r\n | `500 - Internal Server Error` | Something is not working on our end. If you see an error response with a `report_url` URL, please click on it to open an auto-generated GitHub issue |\r\n | `503 - Service Unavailable` | The service has broke. |\r\n\r\n\r\n ### JSON Error Response\r\n\r\n ```json\r\n {\r\n 'status': 404,\r\n 'type': 'BadResponseException',\r\n 'message': 'Resource does not exist',\r\n 'error': 'Something Happened',\r\n 'report_url': 'https://github.com...'\r\n }\r\n ```\r\n\r\n | Property | Remarks |\r\n | ---- | ---- |\r\n | `status` | Returned HTTP Status Code |\r\n | `type` | `Exception` generated from the API |\r\n | `message` | Human-readable error message |\r\n | `error` | Error response and trace from the API |\r\n | `report_url` | Clicking this would redirect you to a generated GitHub issue. ℹ It's only returned on a parser error. |\r\n\r\n\r\n ### Cache Validation\r\n\r\n - All requests return a `ETag` header which is an MD5 hash of the response\r\n - You can use this hash to verify if there's new or updated content by suppliying it as the value for the `If-None-Match` in your next request header\r\n - You will get a HTTP `304 - Not Modified` response if the content has not changed\r\n - If the content has changed, you'll get a HTTP `200 - OK` response with the updated JSON response\r\n\r\n \r\n\r\n ### Disclaimer\r\n\r\n - Jikan is not affiliated with MyAnimeList.net.\r\n - Jikan is a free, open-source API. Please use it responsibly.\r\n\r\n ----\r\n\r\n By using the API, you are agreeing to Jikan's [terms of use](https://jikan.moe/terms) policy.\r\n\r\n [v3 Documentation](https://jikan.docs.apiary.io/) - [Wrappers/SDKs](https://github.com/jikan-me/jikan#wrappers) - [Report an issue](https://github.com/jikan-me/jikan-rest/issues/new)\r\n [Host your own server](https://github.com/jikan-me/jikan-rest)\r\n ",
|
||||
"description": "[Jikan](https://jikan.moe) is an **Unofficial** MyAnimeList API.\n## Information\r\nIt scrapes the website to satisfy the need for a complete API - which MyAnimeList lacks.\r\n\r\n⚡ Jikan is powered by it's awesome backers - 🙏 [Become a backer](https://www.patreon.com/jikan)\r\n\r\n### Rate Limiting\r\n\r\n| Duration | Requests |\r\n|----|----|\r\n| Daily | **Unlimited** |\r\n| Per Minute | 60 requests |\r\n| Per Second | 3 requests |\r\n\r\n\r\n### JSON Notes\r\n- Any property (except arrays or objects) whose value does not exist or is undetermined, will be `null`.\r\n- Any array or object property whose value does not exist or is undetermined, will be `null`.\r\n- Any `score` property whose value does not exist or is undetermined, will be `0`.\r\n- All dates and timestamps are returned in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format and in UTC timezone\r\n\r\n### Caching\r\nBy **CACHING**, we refer to the data parsed from MyAnimeList which is stored temporarily on our servers to provide better API performance.\r\n\r\nAll requests, by default are cached for **24 hours** except the following endpoints which have their own unique cache **Time To Live**.\r\n\r\n| Request | TTL |\r\n| ---- | ---- |\r\n| All (Default) | 24 hours |\r\n| User Anime/Manga List | 5 minutes |\r\n\r\n\r\nThe following response headers will detail cache information.\r\n\r\n| Header | Remarks |\r\n| ---- | ---- |\r\n| `Expires` | Expiry unix timestamp |\r\n\r\n\r\n### Allowed HTTP(s) requests\r\n\r\n**Jikan REST API does not provide authenticated requests for MyAnimeList.** This means you can not use it to update your anime/manga list.\r\nOnly GET requests are supported which return READ-ONLY data.\r\n\r\n### HTTP Responses\r\n\r\n| HTTP Status | Remarks |\r\n| ---- | ---- |\r\n| `200 - OK` | The request was successful |\r\n| `304 - Not Modified` | You have the latest data (Cache Validation response) |\r\n| `400 - Bad Request` | You've made an invalid request. Recheck documentation |\r\n| `404 - Not Found` | The resource was not found or MyAnimeList responded with a `404` |\r\n| `405 - Method Not Allowed` | Requested Method is not supported for resource. Only `GET` requests are allowed |\r\n| `429 - Too Many Request` | You are being rate limited by Jikan or MyAnimeList is rate-limiting our servers (specified in the error response) |\r\n| `500 - Internal Server Error` | Something is not working on our end. If you see an error response with a `report_url` URL, please click on it to open an auto-generated GitHub issue |\r\n| `503 - Service Unavailable` | The service has broke. |\r\n\r\n\r\n### JSON Error Response\r\n\r\n```json\r\n {\r\n 'status': 404,\r\n 'type': 'BadResponseException',\r\n 'message': 'Resource does not exist',\r\n 'error': 'Something Happened',\r\n 'report_url': 'https://github.com...'\r\n }\r\n```\r\n\r\n| Property | Remarks |\r\n| ---- | ---- |\r\n| `status` | Returned HTTP Status Code |\r\n| `type` | `Exception` generated from the API |\r\n| `message` | Human-readable error message |\r\n| `error` | Error response and trace from the API |\r\n| `report_url` | Clicking this would redirect you to a generated GitHub issue. ℹ It's only returned on a parser error. |\r\n\r\n\r\n### Cache Validation\r\n\r\n- All requests return a `ETag` header which is an MD5 hash of the response\r\n- You can use this hash to verify if there's new or updated content by suppliying it as the value for the `If-None-Match` in your next request header\r\n- You will get a HTTP `304 - Not Modified` response if the content has not changed\r\n- If the content has changed, you'll get a HTTP `200 - OK` response with the updated JSON response\r\n\r\n\r\n\r\n### Disclaimer\r\n\r\n- Jikan is not affiliated with MyAnimeList.net.\r\n- Jikan is a free, open-source API. Please use it responsibly.\r\n\r\n----\r\n\r\nBy using the API, you are agreeing to Jikan's [terms of use](https://jikan.moe/terms) policy.\r\n\r\n[v3 Documentation](https://jikan.docs.apiary.io/) - [Wrappers/SDKs](https://github.com/jikan-me/jikan#wrappers) - [Report an issue](https://github.com/jikan-me/jikan-rest/issues/new)\r\n[Host your own server](https://github.com/jikan-me/jikan-rest)",
|
||||
"termsOfService": "https://jikan.moe/terms",
|
||||
"contact": {
|
||||
"name": "API Support (Discord)",
|
||||
@ -6536,4 +6536,4 @@
|
||||
"description": "About",
|
||||
"url": "https://jikan.moe"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user