mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
updates
This commit is contained in:
parent
ee9634a289
commit
27da790c8a
@ -15,7 +15,7 @@ class CharacterController extends Controller
|
||||
|
||||
public function pictures(int $id)
|
||||
{
|
||||
$character = $this->jikan->getCharacterPictures(new CharacterPicturesRequest($id));
|
||||
$character = ['pictures' => $this->jikan->getCharacterPictures(new CharacterPicturesRequest($id))];
|
||||
return response($this->serializer->serialize($character, 'json'));
|
||||
}
|
||||
}
|
||||
|
@ -20,31 +20,25 @@ class MangaController extends Controller
|
||||
|
||||
public function characters(int $id)
|
||||
{
|
||||
$manga = $this->jikan->getMangaCharacters(new MangaCharactersRequest($id));
|
||||
return response($this->serializer->serialize($manga, 'json'));
|
||||
}
|
||||
|
||||
public function episodes(int $id, int $page)
|
||||
{
|
||||
$manga = $this->jikan->getMangaEpisodes(new MangaEpisodesRequest($id, $page));
|
||||
$manga = ['characters' => $this->jikan->getMangaCharacters(new MangaCharactersRequest($id))];
|
||||
return response($this->serializer->serialize($manga, 'json'));
|
||||
}
|
||||
|
||||
public function news(int $id)
|
||||
{
|
||||
$manga = $this->jikan->getNewsList(new MangaNewsRequest($id));
|
||||
$manga = ['articles' => $this->jikan->getNewsList(new MangaNewsRequest($id))];
|
||||
return response($this->serializer->serialize($manga, 'json'));
|
||||
}
|
||||
|
||||
public function forum(int $id)
|
||||
{
|
||||
$manga = $this->jikan->getMangaForum(new MangaForumRequest($id));
|
||||
$manga = ['topics' => $this->jikan->getMangaForum(new MangaForumRequest($id))];
|
||||
return response($this->serializer->serialize($manga, 'json'));
|
||||
}
|
||||
|
||||
public function pictures(int $id)
|
||||
{
|
||||
$manga = $this->jikan->getMangaPictures(new MangaPicturesRequest($id));
|
||||
$manga = ['pictures' => $this->jikan->getMangaPictures(new MangaPicturesRequest($id))];
|
||||
return response($this->serializer->serialize($manga, 'json'));
|
||||
}
|
||||
|
||||
@ -56,7 +50,7 @@ class MangaController extends Controller
|
||||
|
||||
public function moreInfo(int $id)
|
||||
{
|
||||
$manga = $this->jikan->getMangaMoreInfo(new MangaMoreInfoRequest($id));
|
||||
return response($this->serializer->serialize($manga, 'json'));
|
||||
$manga = ['moreinfo' => $this->jikan->getMangaMoreInfo(new MangaMoreInfoRequest($id))];
|
||||
return response(json_encode($manga));
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class PersonController extends Controller
|
||||
|
||||
public function pictures(int $id)
|
||||
{
|
||||
$person = $this->jikan->getPersonPictures(new PersonPicturesRequest($id));
|
||||
$person = ['pictures' => $this->jikan->getPersonPictures(new PersonPicturesRequest($id))];
|
||||
return response($this->serializer->serialize($person, 'json'));
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class RedisCache
|
||||
array_merge(
|
||||
[
|
||||
'request_cached' => $cached,
|
||||
'cache_expiration' => app('redis')->ttl($hashKey),
|
||||
'cache_expiry' => app('redis')->ttl($hashKey),
|
||||
],
|
||||
json_decode(
|
||||
app('redis')->get($hashKey),
|
||||
|
8
composer.lock
generated
8
composer.lock
generated
@ -1694,12 +1694,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jikan-me/jikan.git",
|
||||
"reference": "e92763e8d1bd0b108a4c0b930d3a0a61ccf98848"
|
||||
"reference": "d43c335d9e7c3655ab6f5718972498c71678562a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jikan-me/jikan/zipball/e92763e8d1bd0b108a4c0b930d3a0a61ccf98848",
|
||||
"reference": "e92763e8d1bd0b108a4c0b930d3a0a61ccf98848",
|
||||
"url": "https://api.github.com/repos/jikan-me/jikan/zipball/d43c335d9e7c3655ab6f5718972498c71678562a",
|
||||
"reference": "d43c335d9e7c3655ab6f5718972498c71678562a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1735,7 +1735,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Jikan is an unofficial MyAnimeList API",
|
||||
"time": "2018-08-13T17:54:51+00:00"
|
||||
"time": "2018-08-17T09:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jms/metadata",
|
||||
|
Loading…
x
Reference in New Issue
Block a user