From 9140ebaa19c7e04da28758c733fd6d399b2acc1c Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Sat, 10 Aug 2019 10:10:09 -0400 Subject: [PATCH] Add first GraphQL files for Kitsu for future implementation --- .../GraphQL/Queries/AnimeDetails.graphql | 120 ++++++++++++++++++ .../Kitsu/GraphQL/Queries/UserDetails.graphql | 64 ++++++++++ 2 files changed, 184 insertions(+) create mode 100644 src/API/Kitsu/GraphQL/Queries/AnimeDetails.graphql create mode 100644 src/API/Kitsu/GraphQL/Queries/UserDetails.graphql diff --git a/src/API/Kitsu/GraphQL/Queries/AnimeDetails.graphql b/src/API/Kitsu/GraphQL/Queries/AnimeDetails.graphql new file mode 100644 index 00000000..055ed172 --- /dev/null +++ b/src/API/Kitsu/GraphQL/Queries/AnimeDetails.graphql @@ -0,0 +1,120 @@ +query ($slug: String) { + anime(slug: $slug) { + nodes { + ageRating + ageRatingGuide + bannerImage { + original { + height + name + url + width + } + views { + height + name + url + width + } + } + characters { + nodes { + character { + names { + canonical + alternatives + } + slug + } + role + voices { + nodes { + id + licensor { + id + name + } + locale + person { + id + names { + alternatives + canonical + localized + } + } + } + } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } + endDate + episodeCount + episodeLength + posterImage { + original { + height + name + url + width + } + views { + height + name + url + width + } + } + season + sfw + slug + staff { + nodes { + person { + id + birthday + image { + original { + height + name + url + width + } + views { + height + name + url + width + } + } + names { + alternatives + canonical + localized + } + } + role + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor + } + } + status + synopsis + titles { + alternatives + canonical + localized + } + totalLength + } + } +} diff --git a/src/API/Kitsu/GraphQL/Queries/UserDetails.graphql b/src/API/Kitsu/GraphQL/Queries/UserDetails.graphql new file mode 100644 index 00000000..21df0313 --- /dev/null +++ b/src/API/Kitsu/GraphQL/Queries/UserDetails.graphql @@ -0,0 +1,64 @@ +# Requires authentication to select associated user +query { + session { + account { + email + id + proSubscription { + billingService + tier + } + } + profile { + about + avatarImage { + original { + name + url + width + height + } + } + bannerImage { + original { + name + url + width + height + } + } + id + name + proMessage + proTier + slug + url + waifu { + id + image { + original { + name + url + width + height + } + } + names { + canonical + alternatives + localized + } + primaryMedia { + slug + titles { + canonical + alternatives + localized + } + } + slug + } + waifuOrHusbando + } + } +}