mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
parent
6db9ca70c1
commit
85f8797602
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,8 +6,9 @@ Homestead.yaml
|
||||
composer.phar
|
||||
composer.lock
|
||||
.php_cs.cache
|
||||
.phpunit.result.cache
|
||||
.env.v4
|
||||
/storage/app/indexer
|
||||
/storage/app/failovers.json
|
||||
/storage/app/source_failover_last_downtime
|
||||
/storage/app/source_failover.lock
|
||||
/storage/app/source_failover.lock
|
||||
|
@ -2,13 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers\V4DB;
|
||||
|
||||
use App\Anime;
|
||||
use App\Http\HttpHelper;
|
||||
use App\Http\HttpResponse;
|
||||
use App\Http\QueryBuilder\UserListQueryBuilder;
|
||||
use App\Http\Resources\V4\AnimeCharactersResource;
|
||||
use App\Http\Resources\V4\CommonResource;
|
||||
use App\Http\Resources\V4\ProfileFriendsResource;
|
||||
use App\Http\Resources\V4\ProfileHistoryResource;
|
||||
use App\Http\Resources\V4\ResultsResource;
|
||||
use App\Http\Resources\V4\UserProfileAnimeListCollection;
|
||||
@ -16,17 +11,14 @@ use App\Http\Resources\V4\UserProfileAnimeListResource;
|
||||
use App\Http\Resources\V4\UserProfileMangaListCollection;
|
||||
use App\Http\Resources\V4\UserProfileMangaListResource;
|
||||
use App\Profile;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Jikan\Request\Anime\AnimeCharactersAndStaffRequest;
|
||||
use Jikan\Request\User\RecentlyOnlineUsersRequest;
|
||||
use Jikan\Request\User\UserAnimeListRequest;
|
||||
use Jikan\Request\User\UserClubsRequest;
|
||||
use Jikan\Request\User\UserMangaListRequest;
|
||||
use Jikan\Request\User\UserProfileRequest;
|
||||
use Jikan\Request\User\UserFriendsRequest;
|
||||
use Jikan\Request\User\UserHistoryRequest;
|
||||
use Jikan\Request\User\UserMangaListRequest;
|
||||
use Jikan\Request\User\UserRecommendationsRequest;
|
||||
use Jikan\Request\User\UserReviewsRequest;
|
||||
use MongoDB\BSON\UTCDateTime;
|
||||
@ -308,8 +300,11 @@ class UserController extends Controller
|
||||
* response="200",
|
||||
* description="Returns user favorites",
|
||||
* @OA\JsonContent(
|
||||
* ref="#/components/schemas/user_favorites"
|
||||
* )
|
||||
* @OA\Property(
|
||||
* property="data",
|
||||
* ref="#/components/schemas/user_favorites"
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response="400",
|
||||
|
@ -16,93 +16,82 @@ class ProfileFavoritesResource extends JsonResource
|
||||
* schema="user_favorites",
|
||||
* type="object",
|
||||
*
|
||||
* @OA\Property (
|
||||
* property="anime",
|
||||
* type="array",
|
||||
* description="Favorite Anime",
|
||||
*
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
*
|
||||
* allOf={
|
||||
* @OA\Schema (ref="#/components/schemas/anime_meta"),
|
||||
* @OA\Schema (
|
||||
* @OA\Property (
|
||||
* property="type",
|
||||
* type="string"
|
||||
* ),
|
||||
* @OA\Property (
|
||||
* property="start_year",
|
||||
* type="integer"
|
||||
* ),
|
||||
* ),
|
||||
* },
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="data",
|
||||
* type="object",
|
||||
* description="Favorite entries",
|
||||
* property="manga",
|
||||
* type="array",
|
||||
* description="Favorite Manga",
|
||||
*
|
||||
* @OA\Property (
|
||||
* property="anime",
|
||||
* type="array",
|
||||
* description="Favorite Anime",
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
* allOf={
|
||||
* @OA\Schema (ref="#/components/schemas/manga_meta"),
|
||||
* @OA\Schema (
|
||||
* @OA\Property (
|
||||
* property="type",
|
||||
* type="string"
|
||||
*
|
||||
* @OA\Items (
|
||||
* ),
|
||||
* @OA\Property (
|
||||
* property="start_year",
|
||||
* type="integer"
|
||||
*
|
||||
* ),
|
||||
* ),
|
||||
* },
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="characters",
|
||||
* type="array",
|
||||
* description="Favorite Characters",
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
* allOf={
|
||||
* @OA\Schema (ref="#/components/schemas/character_meta"),
|
||||
* @OA\Schema (ref="#/components/schemas/mal_url_2"),
|
||||
* },
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="people",
|
||||
* type="array",
|
||||
* description="Favorite People",
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
*
|
||||
* @OA\Property (
|
||||
* type="object",
|
||||
*
|
||||
* allOf={
|
||||
* @OA\Schema (ref="#/components/schemas/anime_meta"),
|
||||
* @OA\Schema (
|
||||
* @OA\Property (
|
||||
* property="type",
|
||||
* type="string"
|
||||
* ),
|
||||
* @OA\Property (
|
||||
* property="start_year",
|
||||
* type="integer"
|
||||
* ),
|
||||
* ),
|
||||
* },
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="manga",
|
||||
* type="array",
|
||||
* description="Favorite Manga",
|
||||
*
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
* allOf={
|
||||
* @OA\Schema (ref="#/components/schemas/manga_meta"),
|
||||
* @OA\Schema (
|
||||
* @OA\Property (
|
||||
* property="type",
|
||||
* type="string"
|
||||
*
|
||||
* ),
|
||||
* @OA\Property (
|
||||
* property="start_year",
|
||||
* type="integer"
|
||||
*
|
||||
* ),
|
||||
* ),
|
||||
* },
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="characters",
|
||||
* type="array",
|
||||
* description="Favorite Characters",
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
* allOf={
|
||||
* @OA\Schema (ref="#/components/schemas/character_meta"),
|
||||
* @OA\Schema (
|
||||
* @OA\Property (
|
||||
* type="object",
|
||||
* ref="#/components/schemas/mal_url_2",
|
||||
* ),
|
||||
* ),
|
||||
* },
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="people",
|
||||
* type="array",
|
||||
* description="Favorite People",
|
||||
* @OA\Items (
|
||||
* type="object",
|
||||
*
|
||||
* @OA\Property (
|
||||
* type="object",
|
||||
* ref="#/components/schemas/character_meta",
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
* ref="#/components/schemas/character_meta",
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
* ),
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return $this->favorites;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3257,7 +3257,12 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/user_favorites"
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/user_favorites"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7136,89 +7141,78 @@
|
||||
},
|
||||
"user_favorites": {
|
||||
"properties": {
|
||||
"data": {
|
||||
"description": "Favorite entries",
|
||||
"properties": {
|
||||
"anime": {
|
||||
"description": "Favorite Anime",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_year": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/anime_meta"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"manga": {
|
||||
"description": "Favorite Manga",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_year": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/manga_meta"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"characters": {
|
||||
"description": "Favorite Characters",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"": {
|
||||
"$ref": "#/components/schemas/mal_url_2"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/character_meta"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"people": {
|
||||
"description": "Favorite People",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anime": {
|
||||
"description": "Favorite Anime",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"": {
|
||||
"$ref": "#/components/schemas/character_meta"
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_year": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/anime_meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
]
|
||||
}
|
||||
},
|
||||
"manga": {
|
||||
"description": "Favorite Manga",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_year": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/manga_meta"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"characters": {
|
||||
"description": "Favorite Characters",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/character_meta"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/mal_url_2"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"people": {
|
||||
"description": "Favorite People",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"": {
|
||||
"$ref": "#/components/schemas/character_meta"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@ -8263,4 +8257,4 @@
|
||||
"description": "About",
|
||||
"url": "https://jikan.moe"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user