Update Kitsu GraphQL schema reference

This commit is contained in:
Timothy Warren 2020-08-17 10:25:36 -04:00
parent f3b7e58ee1
commit 24def28cda

View File

@ -97,6 +97,8 @@ interface Media {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MediaCharacterConnection! ): MediaCharacterConnection!
"A brief (mostly spoiler free) summary or description of the media."
description(locales: [String!]): Map!
"the day that this media made its final release" "the day that this media made its final release"
endDate: Date endDate: Date
"The number of users with this in their favorites" "The number of users with this in their favorites"
@ -171,8 +173,6 @@ interface Media {
startDate: Date startDate: Date
"The current releasing status of this media" "The current releasing status of this media"
status: ReleaseStatus! status: ReleaseStatus!
"A brief (mostly spoiler-free) summary/description of the media"
synopsis(locales: [String!]): Map!
"Description of when this media is expected to release" "Description of when this media is expected to release"
tba: String tba: String
"The titles for this media in various locales" "The titles for this media in various locales"
@ -183,6 +183,18 @@ interface Media {
userCount: Int userCount: Int
} }
"Media that is streamable."
interface Streamable {
"Spoken language is replaced by language of choice."
dubs: [String!]!
"Which regions this video is available in."
regions: [String!]!
"The site that is streaming this media."
streamer: Streamer!
"Languages this is translated to. Usually placed at bottom of media."
subs: [String!]!
}
"Objects which are Mappable" "Objects which are Mappable"
union MappingItem = Anime | Category | Character | Episode | Manga | Person | Producer union MappingItem = Anime | Category | Character | Episode | Manga | Person | Producer
@ -246,6 +258,8 @@ type Anime implements Episodic & Media {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MediaCharacterConnection! ): MediaCharacterConnection!
"A brief (mostly spoiler free) summary or description of the media."
description(locales: [String!]): Map!
"the day that this media made its final release" "the day that this media made its final release"
endDate: Date endDate: Date
"The number of episodes in this series" "The number of episodes in this series"
@ -336,10 +350,19 @@ type Anime implements Episodic & Media {
startDate: Date startDate: Date
"The current releasing status of this media" "The current releasing status of this media"
status: ReleaseStatus! status: ReleaseStatus!
"The stream links."
streamingLinks(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): StreamingLinkConnection!
"A secondary type for categorizing Anime." "A secondary type for categorizing Anime."
subtype: AnimeSubtype! subtype: AnimeSubtype!
"A brief (mostly spoiler-free) summary/description of the media"
synopsis(locales: [String!]): Map!
"Description of when this media is expected to release" "Description of when this media is expected to release"
tba: String tba: String
"The titles for this media in various locales" "The titles for this media in various locales"
@ -416,6 +439,24 @@ type AnimeEdge {
node: Anime node: Anime
} }
type AnimeMutation {
"Create an Anime."
create(
"Create an Anime."
input: AnimeCreateInput!
): AnimeCreatePayload
"Delete an Anime."
delete(
"Delete an Anime."
input: GenericDeleteInput!
): AnimeDeletePayload
"Update an Anime."
update(
"Update an Anime."
input: AnimeUpdateInput!
): AnimeUpdatePayload
}
"Autogenerated return type of AnimeUpdate" "Autogenerated return type of AnimeUpdate"
type AnimeUpdatePayload { type AnimeUpdatePayload {
anime: Anime anime: Anime
@ -436,8 +477,8 @@ type Category {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): CategoryConnection ): CategoryConnection
"A description of the category." "A brief summary or description of the catgory."
description(locales: [String!]): Map description(locales: [String!]): Map!
id: ID! id: ID!
"Whether the category is Not-Safe-for-Work." "Whether the category is Not-Safe-for-Work."
isNsfw: Boolean! isNsfw: Boolean!
@ -469,13 +510,65 @@ type CategoryEdge {
node: Category node: Category
} }
"A single chapter part of a volume."
type Chapter {
id: ID!
"The manga this chapter is in."
manga: Manga!
"The number of pages in this chapter."
number: Int!
"The date when this chapter was released."
published: ISO8601Date
"A thumbnail image for the chapter."
thumbnail: Image
"The titles for this chapter in various locales"
titles: TitlesList!
"The volume this chapter is in."
volume: Volume
"The volume number this chapter is in."
volumeNumber: Int
}
"The connection type for Chapter."
type ChapterConnection {
"A list of edges."
edges: [ChapterEdge]
"A list of nodes."
nodes: [Chapter]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type ChapterEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Chapter
}
"Information about a Character in the Kitsu database" "Information about a Character in the Kitsu database"
type Character { type Character {
"A brief summary or description of the character."
description(locales: [String!]): Map!
id: ID! id: ID!
"An image of the character" "An image of the character"
image: Image image: Image
"Media this character appears in."
media(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): MediaCharacterConnection
"The name for this character in various locales" "The name for this character in various locales"
names: TitlesList! names: TitlesList
"The original media this character showed up in" "The original media this character showed up in"
primaryMedia: Media primaryMedia: Media
"The URL-friendly identifier of this character" "The URL-friendly identifier of this character"
@ -576,13 +669,13 @@ type CommentEdge {
type Episode { type Episode {
"The time when the episode aired" "The time when the episode aired"
airedAt: ISO8601DateTime airedAt: ISO8601DateTime
"A brief summary or description of the episode."
description(locales: [String!]): Map!
id: ID! id: ID!
"The length of the Episode in seconds" "The length of the Episode in seconds"
length: Int length: Int
"The sequence number of this episode in the season" "The sequence number of this episode in the season"
number: Int! number: Int!
"A brief summary or description of the episode"
synopsis: [LocalizedString!]
"A thumbnail image for the episode" "A thumbnail image for the episode"
thumbnail: Image thumbnail: Image
"The titles for this episode in various locales" "The titles for this episode in various locales"
@ -623,6 +716,8 @@ type GenericDelete {
} }
type Image { type Image {
"A blurhash-encoded version of this image"
blurhash: String
"The original image" "The original image"
original: ImageView! original: ImageView!
"The various generated views of this image" "The various generated views of this image"
@ -718,6 +813,18 @@ type Library {
"Information about a specific media entry for a user" "Information about a specific media entry for a user"
type LibraryEntry { type LibraryEntry {
"History of user actions for this library entry."
events(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaTypes: [media_type!] = [ANIME]
): LibraryEventConnection
"When the user finished this media." "When the user finished this media."
finishedAt: ISO8601DateTime finishedAt: ISO8601DateTime
id: ID! id: ID!
@ -784,6 +891,24 @@ type LibraryEntryEdge {
node: LibraryEntry node: LibraryEntry
} }
type LibraryEntryMutation {
"Create a Library Entry."
create(
"Create a Library Entry"
input: LibraryEntryCreateInput!
): LibraryEntryCreatePayload
"Delete a Library Entry."
delete(
"Delete Library Entry"
input: GenericDeleteInput!
): LibraryEntryDeletePayload
"Update a Library Entry."
update(
"Update Library Entry"
input: LibraryEntryUpdateInput!
): LibraryEntryUpdatePayload
}
"Autogenerated return type of LibraryEntryUpdate" "Autogenerated return type of LibraryEntryUpdate"
type LibraryEntryUpdatePayload { type LibraryEntryUpdatePayload {
"Graphql Errors" "Graphql Errors"
@ -791,11 +916,39 @@ type LibraryEntryUpdatePayload {
libraryEntry: LibraryEntry libraryEntry: LibraryEntry
} }
type LocalizedString { "History of user actions for a library entry."
"The IETF/BCP 47 locale tag for this string" type LibraryEvent {
locale: String! "The data that was changed for this library event."
"The text value of this string" changedData: Map!
text: String! id: ID!
"The type of library event."
kind: LibraryEventKind!
"The library entry related to this library event."
libraryEntry: LibraryEntry!
"The media related to this library event."
media: Media!
"The user who created this library event"
user: Profile!
}
"The connection type for LibraryEvent."
type LibraryEventConnection {
"A list of edges."
edges: [LibraryEventEdge]
"A list of nodes."
nodes: [LibraryEvent]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type LibraryEventEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: LibraryEvent
} }
type Manga implements Media { type Manga implements Media {
@ -822,6 +975,17 @@ type Manga implements Media {
chapterCount: Int chapterCount: Int
"The estimated number of chapters in this manga." "The estimated number of chapters in this manga."
chapterCountGuess: Int chapterCountGuess: Int
"The chapters in the manga."
chapters(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): ChapterConnection
"The characters who starred in this media" "The characters who starred in this media"
characters( characters(
"Returns the elements in the list that come after the specified cursor." "Returns the elements in the list that come after the specified cursor."
@ -833,6 +997,8 @@ type Manga implements Media {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MediaCharacterConnection! ): MediaCharacterConnection!
"A brief (mostly spoiler free) summary or description of the media."
description(locales: [String!]): Map!
"the day that this media made its final release" "the day that this media made its final release"
endDate: Date endDate: Date
"The number of users with this in their favorites" "The number of users with this in their favorites"
@ -909,8 +1075,6 @@ type Manga implements Media {
status: ReleaseStatus! status: ReleaseStatus!
"A secondary type for categorizing Manga." "A secondary type for categorizing Manga."
subtype: MangaSubtype! subtype: MangaSubtype!
"A brief (mostly spoiler-free) summary/description of the media"
synopsis(locales: [String!]): Map!
"Description of when this media is expected to release" "Description of when this media is expected to release"
tba: String tba: String
"The titles for this media in various locales" "The titles for this media in various locales"
@ -1170,37 +1334,9 @@ type MediaStaffEdge {
} }
type Mutation { type Mutation {
"Create an Anime." anime: AnimeMutation
createAnime( libraryEntry: LibraryEntryMutation
"Create an Anime."
input: AnimeCreateInput!
): AnimeCreatePayload
"Create a Library Entry"
createLibraryEntry(
"Create a Library Entry"
input: LibraryEntryCreateInput!
): LibraryEntryCreatePayload
"Delete an Anime."
deleteAnime(
"Delete an Anime."
input: GenericDeleteInput!
): AnimeDeletePayload
"Delete a Library Entry"
deleteLibraryEntry(
"Delete Library Entry"
input: GenericDeleteInput!
): LibraryEntryDeletePayload
pro: ProMutation! pro: ProMutation!
"Update an Anime."
updateAnime(
"Update an Anime."
input: AnimeUpdateInput!
): AnimeUpdatePayload
"Update a Library Entry"
updateLibraryEntry(
"Update Library Entry"
input: LibraryEntryUpdateInput!
): LibraryEntryUpdatePayload
} }
"Information about pagination in a connection." "Information about pagination in a connection."
@ -1221,10 +1357,10 @@ A Voice Actor, Director, Animator, or other person who works in the creation and
localization of media localization of media
""" """
type Person { type Person {
"A short biography of the person"
biography: Person
"The day when this person was born" "The day when this person was born"
birthday: Date birthday: Date
"A brief biography or description of the person."
description(locales: [String!]): Map!
id: ID! id: ID!
"An image of the person" "An image of the person"
image: Image image: Image
@ -1234,8 +1370,17 @@ type Person {
names: TitlesList! names: TitlesList!
"The URL-friendly identifier of this person." "The URL-friendly identifier of this person."
slug: String! slug: String!
"The voice-acting roles this person has had" "The voice-acting roles this person has had."
voices: CharacterVoice voices(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): CharacterVoiceConnection
} }
"A post that is visible to your followers and globally in the news-feed." "A post that is visible to your followers and globally in the news-feed."
@ -1491,6 +1636,18 @@ type Query {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): AnimeConnection! ): AnimeConnection!
"All Anime with specific Status"
animeByStatus(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
status: ReleaseStatus!
): AnimeConnection
"Kitsu account details. You must supply an Authorization token in header." "Kitsu account details. You must supply an Authorization token in header."
currentAccount: Account currentAccount: Account
"Find a single Anime by ID" "Find a single Anime by ID"
@ -1505,6 +1662,8 @@ type Query {
findCharacterById(id: ID!): Character findCharacterById(id: ID!): Character
"Find a single Character by Slug" "Find a single Character by Slug"
findCharacterBySlug(slug: String!): Character findCharacterBySlug(slug: String!): Character
"Find a single Library Entry by ID"
findLibraryEntryById(id: ID!): LibraryEntry
"Find a single Manga by ID" "Find a single Manga by ID"
findMangaById(id: ID!): Manga findMangaById(id: ID!): Manga
"Find a single Manga by Slug" "Find a single Manga by Slug"
@ -1529,6 +1688,31 @@ type Query {
last: Int, last: Int,
medium: String! medium: String!
): MediaConnection! ): MediaConnection!
"List of Library Entries by MediaType and MediaId"
libraryEntriesByMedia(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaId: ID!,
mediaType: media_type!
): LibraryEntryConnection
"List of Library Entries by MediaType"
libraryEntriesByMediaType(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
mediaType: media_type!
): LibraryEntryConnection
"List trending media within your network" "List trending media within your network"
localTrending( localTrending(
"Returns the elements in the list that come after the specified cursor." "Returns the elements in the list that come after the specified cursor."
@ -1554,6 +1738,18 @@ type Query {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MangaConnection! ): MangaConnection!
"All Manga with specific Status"
mangaByStatus(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
status: ReleaseStatus!
): MangaConnection
"Patrons sorted by a Proprietary Magic Algorithm" "Patrons sorted by a Proprietary Magic Algorithm"
patrons( patrons(
"Returns the elements in the list that come after the specified cursor." "Returns the elements in the list that come after the specified cursor."
@ -1689,13 +1885,79 @@ type SiteLinkEdge {
node: SiteLink node: SiteLink
} }
"The streaming company."
type Streamer {
id: ID!
"The name of the site that is streaming this media."
siteName: String!
"Additional media this site is streaming."
streamingLinks(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): StreamingLinkConnection!
"Videos of the media being streamed."
videos(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): VideoConnection!
}
"The stream link."
type StreamingLink implements Streamable {
"Spoken language is replaced by language of choice."
dubs: [String!]!
id: ID!
"The media being streamed"
media: Media!
"Which regions this video is available in."
regions: [String!]!
"The site that is streaming this media."
streamer: Streamer!
"Languages this is translated to. Usually placed at bottom of media."
subs: [String!]!
"Fully qualified URL for the streaming link."
url: String!
}
"The connection type for StreamingLink."
type StreamingLinkConnection {
"A list of edges."
edges: [StreamingLinkEdge]
"A list of nodes."
nodes: [StreamingLink]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type StreamingLinkEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: StreamingLink
}
type TitlesList { type TitlesList {
"A list of additional, alternative, abbreviated, or unofficial titles" "A list of additional, alternative, abbreviated, or unofficial titles"
alternatives: [String!]! alternatives: [String!]
"The official or de facto international title" "The official or de facto international title"
canonical: String! canonical: String
"The locale code that identifies which title is used as the canonical title" "The locale code that identifies which title is used as the canonical title"
canonicalLocale: String! canonicalLocale: String
"The list of localized titles keyed by locale" "The list of localized titles keyed by locale"
localized(locales: [String!]): Map! localized(locales: [String!]): Map!
} }
@ -1707,6 +1969,69 @@ type UnsubscribePayload {
expiresAt: ISO8601DateTime expiresAt: ISO8601DateTime
} }
"The media video."
type Video implements Streamable {
"Spoken language is replaced by language of choice."
dubs: [String!]!
"The episode of this video"
episode: Episode!
id: ID!
"Which regions this video is available in."
regions: [String!]!
"The site that is streaming this media."
streamer: Streamer!
"Languages this is translated to. Usually placed at bottom of media."
subs: [String!]!
"The url of the video."
url: String!
}
"The connection type for Video."
type VideoConnection {
"A list of edges."
edges: [VideoEdge]
"A list of nodes."
nodes: [Video]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type VideoEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Video
}
"A manga volume which can contain multiple chapters."
type Volume {
"The chapters in this volume."
chapters(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): ChapterConnection
id: ID!
"The isbn number of this volume."
isbn: [String!]!
"The manga this volume is in."
manga: Manga!
"The volume number."
number: Int!
"The date when this chapter was released."
published: ISO8601Date
"The titles for this chapter in various locales"
titles: TitlesList!
}
enum AgeRating { enum AgeRating {
"Acceptable for all ages" "Acceptable for all ages"
G G
@ -1754,6 +2079,19 @@ enum LibraryEntryStatus {
PLANNED PLANNED
} }
enum LibraryEventKind {
"Notes were added/updated."
ANNOTATED
"Progress or Time Spent was added/updated."
PROGRESSED
"Rating was added/updated."
RATED
"Reaction was added/updated."
REACTED
"Status or Reconsuming was added/updated."
UPDATED
}
enum MangaSubtype { enum MangaSubtype {
"Self published work." "Self published work."
DOUJIN DOUJIN
@ -1863,12 +2201,12 @@ input AnimeCreateInput {
ageRating: AgeRating ageRating: AgeRating
ageRatingGuide: String ageRatingGuide: String
bannerImage: Upload bannerImage: Upload
description: Map!
endDate: Date endDate: Date
episodeCount: Int episodeCount: Int
episodeLength: Int episodeLength: Int
posterImage: Upload posterImage: Upload
startDate: Date startDate: Date
synopsis: Map!
tba: String tba: String
titles: TitlesListInput! titles: TitlesListInput!
youtubeTrailerVideoId: String youtubeTrailerVideoId: String
@ -1878,13 +2216,13 @@ input AnimeUpdateInput {
ageRating: AgeRating ageRating: AgeRating
ageRatingGuide: String ageRatingGuide: String
bannerImage: Upload bannerImage: Upload
description: Map
endDate: Date endDate: Date
episodeCount: Int episodeCount: Int
episodeLength: Int episodeLength: Int
id: ID! id: ID!
posterImage: Upload posterImage: Upload
startDate: Date startDate: Date
synopsis: Map
tba: String tba: String
titles: TitlesListInput titles: TitlesListInput
youtubeTrailerVideoId: String youtubeTrailerVideoId: String