Add some previously missing GraphQL fields
This commit is contained in:
parent
a35bce8a4b
commit
78b195f966
@ -15,6 +15,11 @@ use function Aviat\AnimeClient\getLocalImg;
|
||||
<td><?= $data['status'] ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Show Type</td>
|
||||
<td><?= (strlen($data['show_type']) > 3) ? ucfirst(strtolower($data['show_type'])) : $data['show_type'] ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($data['episode_count'] !== 1): ?>
|
||||
<tr>
|
||||
<td>Episode Count</td>
|
||||
|
@ -10,18 +10,22 @@
|
||||
<td class="align-right">Publishing Status</td>
|
||||
<td><?= $data['status'] ?></td>
|
||||
</tr>
|
||||
<?php /* <tr>
|
||||
<tr>
|
||||
<td>Manga Type</td>
|
||||
<td><?= ucfirst($data['manga_type']) ?></td>
|
||||
<td><?= ucfirst(strtolower($data['manga_type'])) ?></td>
|
||||
</tr>
|
||||
<?php if ( ! empty($data['volume_count'])): ?>
|
||||
<tr>
|
||||
<td>Volume Count</td>
|
||||
<td><?= $data['volume_count'] ?></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ( ! empty($data['chapter_count'])): ?>
|
||||
<tr>
|
||||
<td>Chapter Count</td>
|
||||
<td><?= $data['chapter_count'] ?></td>
|
||||
</tr> */ ?>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ( ! empty($data['age_rating'])): ?>
|
||||
<tr>
|
||||
|
@ -107,7 +107,7 @@ query ($slug: String!) {
|
||||
}
|
||||
}
|
||||
status
|
||||
# subType
|
||||
subtype
|
||||
synopsis
|
||||
titles {
|
||||
canonical
|
||||
|
@ -107,7 +107,7 @@ query ($id: ID!) {
|
||||
}
|
||||
}
|
||||
status
|
||||
#subType
|
||||
subtype
|
||||
synopsis
|
||||
titles {
|
||||
canonical
|
||||
|
@ -22,8 +22,8 @@ query ($slug: String!) {
|
||||
title
|
||||
}
|
||||
}
|
||||
# chapterCount
|
||||
# volumeCount
|
||||
chapterCount
|
||||
volumeCount
|
||||
characters {
|
||||
nodes {
|
||||
character {
|
||||
@ -105,7 +105,7 @@ query ($slug: String!) {
|
||||
}
|
||||
}
|
||||
status
|
||||
#subType
|
||||
subtype
|
||||
synopsis
|
||||
titles {
|
||||
canonical
|
||||
|
@ -22,8 +22,8 @@ query ($id: ID!) {
|
||||
title
|
||||
}
|
||||
}
|
||||
# chapterCount
|
||||
# volumeCount
|
||||
chapterCount
|
||||
volumeCount
|
||||
characters {
|
||||
nodes {
|
||||
character {
|
||||
@ -105,7 +105,7 @@ query ($id: ID!) {
|
||||
}
|
||||
}
|
||||
status
|
||||
#subType
|
||||
subtype
|
||||
synopsis
|
||||
titles {
|
||||
canonical
|
||||
|
@ -36,7 +36,6 @@ final class AnimeTransformer extends AbstractTransformer {
|
||||
{
|
||||
// TODO: missing GraphQL data:
|
||||
// * streaming links
|
||||
// * show type
|
||||
|
||||
$base = array_key_exists('findAnimeBySlug', $item['data'])
|
||||
? $item['data']['findAnimeBySlug']
|
||||
@ -114,7 +113,7 @@ final class AnimeTransformer extends AbstractTransformer {
|
||||
'id' => $base['id'],
|
||||
'slug' => $base['slug'],
|
||||
'staff' => $staff,
|
||||
'show_type' => 'TV', // $base['showType']
|
||||
'show_type' => $base['subtype'],
|
||||
'status' => Kitsu::getAiringStatus($base['startDate'], $base['endDate']),
|
||||
'streaming_links' => [], // Kitsu::parseStreamingLinks($item['included']),
|
||||
'synopsis' => $base['synopsis']['en'],
|
||||
|
@ -34,11 +34,6 @@ final class MangaTransformer extends AbstractTransformer {
|
||||
*/
|
||||
public function transform($item): MangaPage
|
||||
{
|
||||
// TODO: missing GraphQL data:
|
||||
// * chapter count
|
||||
// * volume count
|
||||
// * manga type
|
||||
|
||||
$base = array_key_exists('findMangaBySlug', $item['data'])
|
||||
? $item['data']['findMangaBySlug']
|
||||
: $item['data']['findMangaById'];
|
||||
@ -108,11 +103,11 @@ final class MangaTransformer extends AbstractTransformer {
|
||||
'age_rating' => $base['ageRating'],
|
||||
'age_rating_guide' => $base['ageRatingGuide'],
|
||||
'characters' => $characters,
|
||||
// 'chapter_count' => $base['chapterCount'],
|
||||
// 'volume_count' => $base['volumeCount'],
|
||||
'chapter_count' => $base['chapterCount'],
|
||||
'volume_count' => $base['volumeCount'],
|
||||
'cover_image' => $base['posterImage']['views'][1]['url'],
|
||||
'genres' => $genres,
|
||||
// 'manga_type' => $base['subType'],
|
||||
'manga_type' => $base['subtype'],
|
||||
'id' => $base['id'],
|
||||
'staff' => $staff,
|
||||
'status' => Kitsu::getPublishingStatus($base['status'], $base['startDate'], $base['endDate']),
|
||||
|
Loading…
Reference in New Issue
Block a user