gojikan

package module
v0.0.0-...-0b0a46d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 11 Imported by: 0

README

GoJikan

Go Report Card Go Reference

⚠️ Project Status: Under Development ⚠️

GoJikan is a Go client library for the Jikan API v4, which is an unofficial REST API for MyAnimeList. It provides a simple interface for Go developers to fetch data about anime, manga, characters, and more from MyAnimeList via the Jikan API.

Features

  • Easy-to-use Go interface for Jikan API v4 endpoints.
  • Provides Go structs for Jikan API responses.
  • Aims to cover the full Jikan API v4 surface.
  • Client Configuration for custom settings including custom base URL, HTTP client, and cache.
Installation

To add GoJikan to your Go project:

  go get -u github.com/frisbm/gojikan
FAQ:
  • What is Jikan?
    • Jikan is a RESTful API for accessing data from MyAnimeList. It provides a simple and easy-to-use interface for developers to interact with the MyAnimeList API and retrieve information about anime, manga, characters, and more.
  • What is GoJikan?
    • GoJikan is a Go client for the Jikan API. It provides a simple and easy-to-use interface for developers to interact with the Jikan API and retrieve information about anime, manga, characters, and more.
  • Why did I handroll my own client?
    • The OpenAPI generators I tried weren't playing nicely with the Jikan OpenAPI spec. I tried a few different ones, but they all had issues with the spec. So I decided to handroll my own client instead.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiringStatus

type AiringStatus string
const (
	// AiringStatusFinishedAiring Finished Airing
	AiringStatusFinishedAiring AiringStatus = "Finished Airing"
	// AiringStatusCurrentlyAiring Currently Airing
	AiringStatusCurrentlyAiring AiringStatus = "Currently Airing"
	// AiringStatusNotYetAired Not Yet Aired
	AiringStatusNotYetAired AiringStatus = "Not yet aired"
)

func (AiringStatus) String

func (a AiringStatus) String() string

func (*AiringStatus) UnmarshalJSON

func (a *AiringStatus) UnmarshalJSON(b []byte) error

type Anime

type Anime struct {
	// MyAnimeList ID
	MalId int32 `json:"mal_id,omitempty"`
	// MyAnimeList URL
	Url     string       `json:"url,omitempty"`
	Images  *AnimeImages `json:"images,omitempty"`
	Trailer *TrailerBase `json:"trailer,omitempty"`
	// Whether the entry is pending approval on MAL or not
	Approved bool `json:"approved,omitempty"`
	// All titles
	Titles []Title `json:"titles,omitempty"`
	// Title
	Title string `json:"title,omitempty"`
	// English Title
	TitleEnglish string `json:"title_english,omitempty"`
	// Japanese Title
	TitleJapanese string `json:"title_japanese,omitempty"`
	// Other Titles
	TitleSynonyms []string `json:"title_synonyms,omitempty"`
	// Anime Type
	Type AnimeType `json:"type,omitempty"`
	// Original Material/Source adapted from
	Source string `json:"source,omitempty"`
	// Episode count
	Episodes int32 `json:"episodes,omitempty"`
	// Airing status
	Status AiringStatus `json:"status,omitempty"`
	// Airing boolean
	Airing bool       `json:"airing,omitempty"`
	Aired  *Daterange `json:"aired,omitempty"`
	// Parsed raw duration
	Duration string `json:"duration,omitempty"`
	// Anime audience rating
	Rating AnimeRating `json:"rating,omitempty"`
	// Score
	Score float64 `json:"score,omitempty"`
	// Number of users
	ScoredBy int32 `json:"scored_by,omitempty"`
	// Ranking
	Rank int32 `json:"rank,omitempty"`
	// Popularity
	Popularity int32 `json:"popularity,omitempty"`
	// Number of users who have added this entry to their list
	Members int32 `json:"members,omitempty"`
	// Number of users who have favorited this entry
	Favorites int32 `json:"favorites,omitempty"`
	// Synopsis
	Synopsis string `json:"synopsis,omitempty"`
	// Background
	Background string `json:"background,omitempty"`
	// Season
	Season Season `json:"season,omitempty"`
	// Year
	Year           int32      `json:"year,omitempty"`
	Broadcast      *Broadcast `json:"broadcast,omitempty"`
	Producers      []MalUrl   `json:"producers,omitempty"`
	Licensors      []MalUrl   `json:"licensors,omitempty"`
	Studios        []MalUrl   `json:"studios,omitempty"`
	Genres         []MalUrl   `json:"genres,omitempty"`
	ExplicitGenres []MalUrl   `json:"explicit_genres,omitempty"`
	Themes         []MalUrl   `json:"themes,omitempty"`
	Demographics   []MalUrl   `json:"demographics,omitempty"`
}

type AnimeCharacters

type AnimeCharacters struct {
	Character *AnimeCharactersCharacter `json:"character,omitempty"`
	// Character's Role
	Role        string                       `json:"role,omitempty"`
	VoiceActors []AnimeCharactersVoiceActors `json:"voice_actors,omitempty"`
}

type AnimeCharactersCharacter

type AnimeCharactersCharacter struct {
	// MyAnimeList ID
	MalId int32 `json:"mal_id,omitempty"`
	// MyAnimeList URL
	Url    string           `json:"url,omitempty"`
	Images *CharacterImages `json:"images,omitempty"`
	// Character Name
	Name string `json:"name,omitempty"`
}

type AnimeCharactersPerson

type AnimeCharactersPerson struct {
	MalId  int32         `json:"mal_id,omitempty"`
	Url    string        `json:"url,omitempty"`
	Images *PeopleImages `json:"images,omitempty"`
	Name   string        `json:"name,omitempty"`
}

type AnimeCharactersVoiceActors

type AnimeCharactersVoiceActors struct {
	Person   *AnimeCharactersPerson `json:"person,omitempty"`
	Language string                 `json:"language,omitempty"`
}

type AnimeFull

type AnimeFull struct {
	// MyAnimeList ID
	MalId int32 `json:"mal_id,omitempty"`
	// MyAnimeList URL
	Url     string       `json:"url,omitempty"`
	Images  *AnimeImages `json:"images,omitempty"`
	Trailer *TrailerBase `json:"trailer,omitempty"`
	// Whether the entry is pending approval on MAL or not
	Approved bool `json:"approved,omitempty"`
	// All titles
	Titles []Title `json:"titles,omitempty"`
	// Title
	Title string `json:"title,omitempty"`
	// English Title
	TitleEnglish string `json:"title_english,omitempty"`
	// Japanese Title
	TitleJapanese string `json:"title_japanese,omitempty"`
	// Other Titles
	TitleSynonyms []string `json:"title_synonyms,omitempty"`
	// Anime Type
	Type AnimeType `json:"type,omitempty"`
	// Original Material/Source adapted from
	Source string `json:"source,omitempty"`
	// Episode count
	Episodes int32 `json:"episodes,omitempty"`
	// Airing status
	Status AiringStatus `json:"status,omitempty"`
	// Airing boolean
	Airing bool       `json:"airing,omitempty"`
	Aired  *Daterange `json:"aired,omitempty"`
	// Parsed raw duration
	Duration string `json:"duration,omitempty"`
	// Anime audience rating
	Rating AnimeRating `json:"rating,omitempty"`
	// Score
	Score float64 `json:"score,omitempty"`
	// Number of users
	ScoredBy int32 `json:"scored_by,omitempty"`
	// Ranking
	Rank int32 `json:"rank,omitempty"`
	// Popularity
	Popularity int32 `json:"popularity,omitempty"`
	// Number of users who have added this entry to their list
	Members int32 `json:"members,omitempty"`
	// Number of users who have favorited this entry
	Favorites int32 `json:"favorites,omitempty"`
	// Synopsis
	Synopsis string `json:"synopsis,omitempty"`
	// Background
	Background string `json:"background,omitempty"`
	// Season
	Season Season `json:"season,omitempty"`
	// Year
	Year           int32                `json:"year,omitempty"`
	Broadcast      *Broadcast           `json:"broadcast,omitempty"`
	Producers      []MalUrl             `json:"producers,omitempty"`
	Licensors      []MalUrl             `json:"licensors,omitempty"`
	Studios        []MalUrl             `json:"studios,omitempty"`
	Genres         []MalUrl             `json:"genres,omitempty"`
	ExplicitGenres []MalUrl             `json:"explicit_genres,omitempty"`
	Themes         []MalUrl             `json:"themes,omitempty"`
	Demographics   []MalUrl             `json:"demographics,omitempty"`
	Relations      []AnimeFullRelations `json:"relations,omitempty"`
	Theme          *AnimeFullTheme      `json:"theme,omitempty"`
	External       []AnimeFullExternal  `json:"external,omitempty"`
	Streaming      []AnimeFullExternal  `json:"streaming,omitempty"`
}

type AnimeFullExternal

type AnimeFullExternal struct {
	Name string `json:"name,omitempty"`
	Url  string `json:"url,omitempty"`
}

type AnimeFullRelations

type AnimeFullRelations struct {
	// Relation type
	Relation string   `json:"relation,omitempty"`
	Entry    []MalUrl `json:"entry,omitempty"`
}

AnimeFullRelations is the relations of the anime

type AnimeFullTheme

type AnimeFullTheme struct {
	Openings []string `json:"openings,omitempty"`
	Endings  []string `json:"endings,omitempty"`
}

type AnimeImages

type AnimeImages struct {
	Jpg  *Jpg  `json:"jpg,omitempty"`
	Webp *Webp `json:"webp,omitempty"`
}

type AnimeRating

type AnimeRating string
const (
	// AnimeRatingG G - All Ages
	AnimeRatingG AnimeRating = "G - All Ages"
	// AnimeRatingPG PG - Children
	AnimeRatingPG AnimeRating = "PG - Children"
	// AnimeRatingPG13 PG-13 - Teens 13 or older
	AnimeRatingPG13 AnimeRating = "PG-13 - Teens 13 or older"
	// AnimeRatingR R - 17+ (violence & profanity)
	AnimeRatingR AnimeRating = "R - 17+ (violence & profanity)"
	// AnimeRatingRPlus R+ - Mild Nudity
	AnimeRatingRPlus AnimeRating = "R+ - Mild Nudity"
	// AnimeRatingRx Rx - Hentai
	AnimeRatingRx AnimeRating = "Rx - Hentai"
)

func (AnimeRating) String

func (a AnimeRating) String() string

func (*AnimeRating) UnmarshalJSON

func (a *AnimeRating) UnmarshalJSON(b []byte) error

type AnimeStaff

type AnimeStaff struct {
	Person *AnimeStaffPerson `json:"person,omitempty"`
	// Staff Positions
	Positions []string `json:"positions,omitempty"`
}

type AnimeStaffPerson

type AnimeStaffPerson struct {
	// MyAnimeList ID
	MalId int32 `json:"mal_id,omitempty"`
	// MyAnimeList URL
	Url    string        `json:"url,omitempty"`
	Images *PeopleImages `json:"images,omitempty"`
	// Name
	Name string `json:"name,omitempty"`
}

type AnimeStatus

type AnimeStatus string
const (
	// AnimeStatusAiring Airing
	AnimeStatusAiring AnimeStatus = "airing"
	// AnimeStatusComplete Complete
	AnimeStatusComplete AnimeStatus = "complete"
	// AnimeStatusUpcoming Upcoming
	AnimeStatusUpcoming AnimeStatus = "upcoming"
)

func (AnimeStatus) String

func (a AnimeStatus) String() string

func (*AnimeStatus) UnmarshalJSON

func (a *AnimeStatus) UnmarshalJSON(b []byte) error

type AnimeType

type AnimeType string
const (
	// AnimeTypeTV TV
	AnimeTypeTV AnimeType = "TV"
	// AnimeTypeOVA OVA
	AnimeTypeOVA AnimeType = "OVA"
	// AnimeTypeMovie Movie
	AnimeTypeMovie AnimeType = "Movie"
	// AnimeTypeSpecial Special
	AnimeTypeSpecial AnimeType = "Special"
	// AnimeTypeONA ONA
	AnimeTypeONA AnimeType = "ONA"
	// AnimeTypeMusic Music
	AnimeTypeMusic AnimeType = "Music"
)

func (AnimeType) String

func (a AnimeType) String() string

func (*AnimeType) UnmarshalJSON

func (a *AnimeType) UnmarshalJSON(b []byte) error

type Broadcast

type Broadcast struct {
	// Day of the week
	Day string `json:"day,omitempty"`
	// Time in 24 hour format
	Time string `json:"time,omitempty"`
	// Timezone (Tz Database format https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
	Timezone string `json:"timezone,omitempty"`
	// Raw parsed broadcast string
	String string `json:"string,omitempty"`
}

Broadcast Details

type CharacterImages

type CharacterImages struct {
	Jpg  *CharacterImagesJpg  `json:"jpg,omitempty"`
	Webp *CharacterImagesWebp `json:"webp,omitempty"`
}

type CharacterImagesJpg

type CharacterImagesJpg struct {
	// Image URL JPG
	ImageUrl string `json:"image_url,omitempty"`
	// Small Image URL JPG
	SmallImageUrl string `json:"small_image_url,omitempty"`
}

type CharacterImagesWebp

type CharacterImagesWebp struct {
	// Image URL WEBP
	ImageUrl string `json:"image_url,omitempty"`
	// Small Image URL WEBP
	SmallImageUrl string `json:"small_image_url,omitempty"`
}

type CharacterOrderBy

type CharacterOrderBy string
const (
	// CharacterOrderByMalId MyAnimeList ID
	CharacterOrderByMalId CharacterOrderBy = "mal_id"
	// CharacterOrderByName Name
	CharacterOrderByName CharacterOrderBy = "name"
	// CharacterOrderByFavorites Favorites
	CharacterOrderByFavorites CharacterOrderBy = "favorites"
)

func (CharacterOrderBy) String

func (c CharacterOrderBy) String() string

func (*CharacterOrderBy) UnmarshalJSON

func (c *CharacterOrderBy) UnmarshalJSON(b []byte) error

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...ClientOption) (*Client, error)

func (*Client) GetAnimeById

func (c *Client) GetAnimeById(ctx context.Context, id int) (Anime, error)

func (*Client) GetAnimeCharacters

func (c *Client) GetAnimeCharacters(ctx context.Context, id int) ([]AnimeCharacters, error)

func (*Client) GetAnimeEpisodeById

func (c *Client) GetAnimeEpisodeById(ctx context.Context) (any, error)

func (*Client) GetAnimeEpisodes

func (c *Client) GetAnimeEpisodes(ctx context.Context) (any, error)

func (*Client) GetAnimeExternal

func (c *Client) GetAnimeExternal(ctx context.Context) (any, error)

func (*Client) GetAnimeForum

func (c *Client) GetAnimeForum(ctx context.Context) (any, error)

func (*Client) GetAnimeFullById

func (c *Client) GetAnimeFullById(ctx context.Context, id int) (AnimeFull, error)

func (*Client) GetAnimeMoreInfo

func (c *Client) GetAnimeMoreInfo(ctx context.Context) (any, error)

func (*Client) GetAnimeNews

func (c *Client) GetAnimeNews(ctx context.Context) (any, error)

func (*Client) GetAnimePictures

func (c *Client) GetAnimePictures(ctx context.Context) (any, error)

func (*Client) GetAnimeRecommendations

func (c *Client) GetAnimeRecommendations(ctx context.Context) (any, error)

func (*Client) GetAnimeRelations

func (c *Client) GetAnimeRelations(ctx context.Context) (any, error)

func (*Client) GetAnimeReviews

func (c *Client) GetAnimeReviews(ctx context.Context) (any, error)

func (*Client) GetAnimeStaff

func (c *Client) GetAnimeStaff(ctx context.Context, id int) ([]AnimeStaff, error)

func (*Client) GetAnimeStatistics

func (c *Client) GetAnimeStatistics(ctx context.Context) (any, error)

func (*Client) GetAnimeStreaming

func (c *Client) GetAnimeStreaming(ctx context.Context) (any, error)

func (*Client) GetAnimeThemes

func (c *Client) GetAnimeThemes(ctx context.Context) (any, error)

func (*Client) GetAnimeUserUpdates

func (c *Client) GetAnimeUserUpdates(ctx context.Context) (any, error)

func (*Client) GetAnimeVideos

func (c *Client) GetAnimeVideos(ctx context.Context) (any, error)

func (*Client) GetAnimeVideosEpisodes

func (c *Client) GetAnimeVideosEpisodes(ctx context.Context) (any, error)

type ClientOption

type ClientOption func(c *Client)

func WithBaseURL

func WithBaseURL(baseUrl string) ClientOption

WithBaseURL returns a ClientOption that allows you to set a custom base URL for the client. The base URL will be trimmed of leading and trailing slashes: "/"

func WithCache

func WithCache(ttl time.Duration) ClientOption

WithCache returns a ClientOption that enables caching for the client.

func WithHTTPClient

func WithHTTPClient(client *http.Client) ClientOption

WithHTTPClient returns a ClientOption that allows you to set a custom HTTP client. Cannot be used with WithCache.

func WithRateLimit

func WithRateLimit(requests float64, interval time.Duration, burst int) ClientOption

WithRateLimit sets a rate limiter on the client. It allows specifying the maximum number of requests (`requests`) allowed within a given time `interval`. The `burst` parameter specifies the maximum number of tokens that can be initially available or accumulated, allowing for short bursts exceeding the average rate.

type ClubAccess

type ClubAccess string
const (
	// ClubAccessPublic Public
	ClubAccessPublic ClubAccess = "public"
	// ClubAccessPrivate Private
	ClubAccessPrivate ClubAccess = "private"
	// ClubAccessSecret Secret
	ClubAccessSecret ClubAccess = "secret"
)

func (ClubAccess) String

func (c ClubAccess) String() string

func (*ClubAccess) UnmarshalJSON

func (c *ClubAccess) UnmarshalJSON(b []byte) error

type ClubCategory

type ClubCategory string
const (
	// ClubCategoryActorsAndArtists Actors and Artists
	ClubCategoryActorsAndArtists ClubCategory = "actors & artists"
	// ClubCategoryAnime Anime
	ClubCategoryAnime ClubCategory = "anime"
	// ClubCategoryCharacters Characters
	ClubCategoryCharacters ClubCategory = "characters"
	// ClubCategoryCitiesAndNeighborhoods Cities and Neighborhoods
	ClubCategoryCitiesAndNeighborhoods ClubCategory = "cities & neighborhoods"
	// ClubCategoryCompanies Companies
	ClubCategoryCompanies ClubCategory = "companies"
	// ClubCategoryConventions Conventions
	ClubCategoryConventions ClubCategory = "conventions"
	// ClubCategoryGames Games
	ClubCategoryGames ClubCategory = "games"
	// ClubCategoryJapan Japan
	ClubCategoryJapan ClubCategory = "japan"
	// ClubCategoryManga Manga
	ClubCategoryManga ClubCategory = "manga"
	// ClubCategoryMusic Music
	ClubCategoryMusic ClubCategory = "music"
	// ClubCategoryOther Other
	ClubCategoryOther ClubCategory = "others"
	// ClubCategorySchools Schools
	ClubCategorySchools ClubCategory = "schools"
)

func (ClubCategory) String

func (c ClubCategory) String() string

func (*ClubCategory) UnmarshalJSON

func (c *ClubCategory) UnmarshalJSON(b []byte) error

type ClubOrderBy

type ClubOrderBy string
const (
	// ClubOrderByMalId MyAnimeList ID
	ClubOrderByMalId ClubOrderBy = "mal_id"
	// ClubOrderByName Name
	ClubOrderByName ClubOrderBy = "name"
	// ClubOrderByMembersCount Members Count
	ClubOrderByMembersCount ClubOrderBy = "members_count"
	// ClubOrderByCreated Created
	ClubOrderByCreated ClubOrderBy = "created"
)

func (ClubOrderBy) String

func (c ClubOrderBy) String() string

func (*ClubOrderBy) UnmarshalJSON

func (c *ClubOrderBy) UnmarshalJSON(b []byte) error

type ClubType

type ClubType string
const (
	// ClubTypePublic Public
	ClubTypePublic ClubType = "public"
	// ClubTypePrivate Private
	ClubTypePrivate ClubType = "private"
	// ClubTypeSecret Secret
	ClubTypeSecret ClubType = "secret"
)

func (ClubType) String

func (c ClubType) String() string

func (*ClubType) UnmarshalJSON

func (c *ClubType) UnmarshalJSON(b []byte) error

type Date

type Date struct {
	// Day
	Day int32 `json:"day,omitempty"`
	// Month
	Month int32 `json:"month,omitempty"`
	// Year
	Year int32 `json:"year,omitempty"`
}

Date Date object

type Daterange

type Daterange struct {
	// Date ISO8601
	From string `json:"from,omitempty"`
	// Date ISO8601
	To   string `json:"to,omitempty"`
	Prop *Prop  `json:"prop,omitempty"`
}

Daterange Date range

type ErrorResponse

type ErrorResponse struct {
	Status    int    `json:"status"`
	Type      string `json:"type"`
	Message   string `json:"message"`
	ApiError  string `json:"error"`
	ReportUrl string `json:"report_url"`
}

ErrorResponse represents the error response from the API.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

Error implements the error interface for ErrorResponse.

func (*ErrorResponse) Is

func (e *ErrorResponse) Is(target error) bool

func (*ErrorResponse) UnmarshalJSON

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

type FilterAnimeRating

type FilterAnimeRating string
const (
	// FilterAnimeRatingG G
	FilterAnimeRatingG FilterAnimeRating = "g"
	// FilterAnimeRatingPG PG
	FilterAnimeRatingPG FilterAnimeRating = "pg"
	// FilterAnimeRatingPG13 PG13
	FilterAnimeRatingPG13 FilterAnimeRating = "pg13"
	// FilterAnimeRatingR17 R17
	FilterAnimeRatingR17 FilterAnimeRating = "r17"
	// FilterAnimeRatingR R
	FilterAnimeRatingR FilterAnimeRating = "r"
	// FilterAnimeRatingRx Rx
	FilterAnimeRatingRx FilterAnimeRating = "rx"
)

func (FilterAnimeRating) String

func (a FilterAnimeRating) String() string

func (*FilterAnimeRating) UnmarshalJSON

func (a *FilterAnimeRating) UnmarshalJSON(b []byte) error

type FilterAnimeType

type FilterAnimeType string
const (
	// FilterAnimeTypeTV TV
	FilterAnimeTypeTV FilterAnimeType = "tv"
	// FilterAnimeTypeMovie Movie
	FilterAnimeTypeMovie FilterAnimeType = "movie"
	// FilterAnimeTypeOva OVA
	FilterAnimeTypeOva FilterAnimeType = "ova"
	// FilterAnimeTypeSpecial Special
	FilterAnimeTypeSpecial FilterAnimeType = "special"
	// FilterAnimeTypeOna ONA
	FilterAnimeTypeOna FilterAnimeType = "ona"
	// FilterAnimeTypeMusic Music
	FilterAnimeTypeMusic FilterAnimeType = "music"
	// FilterAnimeTypeCM CM
	FilterAnimeTypeCM FilterAnimeType = "cm"
	// FilterAnimeTypePV PV
	FilterAnimeTypePV FilterAnimeType = "pv"
	// FilterAnimeTypeTVSpecial TV Special
	FilterAnimeTypeTVSpecial FilterAnimeType = "tv_special"
)

func (FilterAnimeType) String

func (a FilterAnimeType) String() string

func (*FilterAnimeType) UnmarshalJSON

func (a *FilterAnimeType) UnmarshalJSON(b []byte) error

type FilterDay

type FilterDay string
const (
	// FilterDayMonday Monday
	FilterDayMonday FilterDay = "monday"
	// FilterDayTuesday Tuesday
	FilterDayTuesday FilterDay = "tuesday"
	// FilterDayWednesday Wednesday
	FilterDayWednesday FilterDay = "wednesday"
	// FilterDayThursday Thursday
	FilterDayThursday FilterDay = "thursday"
	// FilterDayFriday Friday
	FilterDayFriday FilterDay = "friday"
	// FilterDaySaturday Saturday
	FilterDaySaturday FilterDay = "saturday"
	// FilterDaySunday Sunday
	FilterDaySunday FilterDay = "sunday"
	// FilterDayUnknown Unknown
	FilterDayUnknown FilterDay = "unknown"
	// FilterDayOther Other
	FilterDayOther FilterDay = "other"
)

func (FilterDay) String

func (f FilterDay) String() string

func (*FilterDay) UnmarshalJSON

func (f *FilterDay) UnmarshalJSON(b []byte) error

type FilterEntryType

type FilterEntryType string
const (
	// FilterEntryTypeTV TV
	FilterEntryTypeTV FilterEntryType = "tv"
	// FilterEntryTypeMovie Movie
	FilterEntryTypeMovie FilterEntryType = "movie"
	// FilterEntryTypeOva OVA
	FilterEntryTypeOva FilterEntryType = "ova"
	// FilterEntryTypeSpecial Special
	FilterEntryTypeSpecial FilterEntryType = "special"
	// FilterEntryTypeOna ONA
	FilterEntryTypeOna FilterEntryType = "ona"
	// FilterEntryTypeMusic Music
	FilterEntryTypeMusic FilterEntryType = "music"
)

func (FilterEntryType) String

func (f FilterEntryType) String() string

func (*FilterEntryType) UnmarshalJSON

func (f *FilterEntryType) UnmarshalJSON(b []byte) error

type FilterKids

type FilterKids string
const (
	// FilterKidsTrue True
	FilterKidsTrue FilterKids = "true"
	// FilterKidsFalse False
	FilterKidsFalse FilterKids = "false"
)

func (FilterKids) String

func (f FilterKids) String() string

func (*FilterKids) UnmarshalJSON

func (f *FilterKids) UnmarshalJSON(b []byte) error

type FilterMangaType

type FilterMangaType string
const (
	// FilterMangaTypeManga Manga
	FilterMangaTypeManga FilterMangaType = "manga"
	// FilterMangaTypeNovel Novel
	FilterMangaTypeNovel FilterMangaType = "novel"
	// FilterMangaTypeLightNovel Light Novel
	FilterMangaTypeLightNovel FilterMangaType = "lightnovel"
	// FilterMangaTypeOneShot One Shot
	FilterMangaTypeOneShot FilterMangaType = "oneshot"
	// FilterMangaTypeDoujin Doujin
	FilterMangaTypeDoujin FilterMangaType = "doujin"
	// FilterMangaTypeManhwa Manhwa
	FilterMangaTypeManhwa FilterMangaType = "manhwa"
	// FilterMangaTypeManhua Manhua
	FilterMangaTypeManhua FilterMangaType = "manhua"
)

func (FilterMangaType) String

func (m FilterMangaType) String() string

func (*FilterMangaType) UnmarshalJSON

func (m *FilterMangaType) UnmarshalJSON(b []byte) error

type FilterSfw

type FilterSfw string
const (
	// FilterSfwTrue True
	FilterSfwTrue FilterSfw = "true"
	// FilterSfwFalse False
	FilterSfwFalse FilterSfw = "false"
)

func (FilterSfw) String

func (f FilterSfw) String() string

func (*FilterSfw) UnmarshalJSON

func (f *FilterSfw) UnmarshalJSON(b []byte) error

type FilterTopic

type FilterTopic string
const (
	// FilterTopicAll All topics
	FilterTopicAll FilterTopic = "all"
	// FilterTopicEpisode Episode topics
	FilterTopicEpisode FilterTopic = "episode"
	// FilterTopicOther Other topics
	FilterTopicOther FilterTopic = "other"
)

func (FilterTopic) String

func (f FilterTopic) String() string

func (*FilterTopic) UnmarshalJSON

func (f *FilterTopic) UnmarshalJSON(b []byte) error

type FilterUserAnimeListStatus

type FilterUserAnimeListStatus string
const (
	// FilterUserAnimeListStatusAll All
	FilterUserAnimeListStatusAll FilterUserAnimeListStatus = "all"
	// FilterUserAnimeListStatusWatching Watching
	FilterUserAnimeListStatusWatching FilterUserAnimeListStatus = "watching"
	// FilterUserAnimeListStatusCompleted Completed
	FilterUserAnimeListStatusCompleted FilterUserAnimeListStatus = "completed"
	// FilterUserAnimeListStatusOnHold On Hold
	FilterUserAnimeListStatusOnHold FilterUserAnimeListStatus = "onhold"
	// FilterUserAnimeListStatusDropped Dropped
	FilterUserAnimeListStatusDropped FilterUserAnimeListStatus = "dropped"
	// FilterUserAnimeListStatusPlanToWatch Plan to Watch
	FilterUserAnimeListStatusPlanToWatch FilterUserAnimeListStatus = "plantowatch"
)

func (FilterUserAnimeListStatus) String

func (f FilterUserAnimeListStatus) String() string

func (*FilterUserAnimeListStatus) UnmarshalJSON

func (f *FilterUserAnimeListStatus) UnmarshalJSON(b []byte) error

type FilterUserHistoryType

type FilterUserHistoryType string
const (
	// FilterUserHistoryTypeAnime Anime
	FilterUserHistoryTypeAnime FilterUserHistoryType = "anime"
	// FilterUserHistoryTypeManga Manga
	FilterUserHistoryTypeManga FilterUserHistoryType = "manga"
)

func (FilterUserHistoryType) String

func (f FilterUserHistoryType) String() string

func (*FilterUserHistoryType) UnmarshalJSON

func (f *FilterUserHistoryType) UnmarshalJSON(b []byte) error

type Gender

type Gender string
const (
	// GenderAny Any
	GenderAny Gender = "any"
	// GenderMale Male
	GenderMale Gender = "male"
	// GenderFemale Female
	GenderFemale Gender = "female"
	// GenderNonbinary Nonbinary
	GenderNonbinary Gender = "nonbinary"
)

func (Gender) String

func (g Gender) String() string

func (*Gender) UnmarshalJSON

func (g *Gender) UnmarshalJSON(b []byte) error

type GenreFilter

type GenreFilter string
const (
	// GenreFilterGenres Genres
	GenreFilterGenres GenreFilter = "genres"
	// GenreFilterExplicitGenres Explicit Genres
	GenreFilterExplicitGenres GenreFilter = "explicit_genres"
	// GenreFilterThemes Themes
	GenreFilterThemes GenreFilter = "themes"
	// GenreFilterDemographics Demographics
	GenreFilterDemographics GenreFilter = "demographics"
)

func (GenreFilter) String

func (g GenreFilter) String() string

func (*GenreFilter) UnmarshalJSON

func (g *GenreFilter) UnmarshalJSON(b []byte) error

type Jpg

type Jpg struct {
	// Image URL JPG
	ImageUrl string `json:"image_url,omitempty"`
	// Small Image URL JPG
	SmallImageUrl string `json:"small_image_url,omitempty"`
	// Image URL JPG
	LargeImageUrl string `json:"large_image_url,omitempty"`
}

Jpg Available images in JPG

type MagazineOrderBy

type MagazineOrderBy string
const (
	// MagazineOrderByMalId MyAnimeList ID
	MagazineOrderByMalId MagazineOrderBy = "mal_id"
	// MagazineOrderByName Name
	MagazineOrderByName MagazineOrderBy = "name"
	// MagazineOrderByCount Count
	MagazineOrderByCount MagazineOrderBy = "count"
)

func (MagazineOrderBy) String

func (m MagazineOrderBy) String() string

func (*MagazineOrderBy) UnmarshalJSON

func (m *MagazineOrderBy) UnmarshalJSON(b []byte) error

type MalUrl

type MalUrl struct {
	// MyAnimeList ID
	MalId int32 `json:"mal_id,omitempty"`
	// Type of resource
	Type string `json:"type,omitempty"`
	// Resource Name
	Name string `json:"name,omitempty"`
	// Resource Title
	Title string `json:"title,omitempty"`
	// MyAnimeList URL
	Url string `json:"url,omitempty"`
}

MalUrl Parsed URL Data

type MangaOrderBy

type MangaOrderBy string
const (
	// MangaOrderByMalId MyAnimeList ID
	MangaOrderByMalId MangaOrderBy = "mal_id"
	// MangaOrderByTitle Title
	MangaOrderByTitle MangaOrderBy = "title"
	// MangaOrderByStartDate Start Date
	MangaOrderByStartDate MangaOrderBy = "start_date"
	// MangaOrderByEndDate End Date
	MangaOrderByEndDate MangaOrderBy = "end_date"
	// MangaOrderByChapters Chapters
	MangaOrderByChapters MangaOrderBy = "chapters"
	// MangaOrderByVolumes Volumes
	MangaOrderByVolumes MangaOrderBy = "volumes"
	// MangaOrderByScore Score
	MangaOrderByScore MangaOrderBy = "score"
	// MangaOrderByScoredBy Scored By
	MangaOrderByScoredBy MangaOrderBy = "scored_by"
	// MangaOrderByRank Rank
	MangaOrderByRank MangaOrderBy = "rank"
	// MangaOrderByPopularity Popularity
	MangaOrderByPopularity MangaOrderBy = "popularity"
	// MangaOrderByMembers Members
	MangaOrderByMembers MangaOrderBy = "members"
	// MangaOrderByFavorites Favorites
	MangaOrderByFavorites MangaOrderBy = "favorites"
)

func (MangaOrderBy) String

func (m MangaOrderBy) String() string

func (*MangaOrderBy) UnmarshalJSON

func (m *MangaOrderBy) UnmarshalJSON(b []byte) error

type MangaStatus

type MangaStatus string
const (
	// MangaStatusPublishing Publishing
	MangaStatusPublishing MangaStatus = "publishing"
	// MangaStatusComplete Complete
	MangaStatusComplete MangaStatus = "complete"
	// MangaStatusHiatus Hiatus
	MangaStatusHiatus MangaStatus = "hiatus"
	// MangaStatusDiscontinued Discontinued
	MangaStatusDiscontinued MangaStatus = "discontinued"
	// MangaStatusUpcoming Upcoming
	MangaStatusUpcoming MangaStatus = "upcoming"
)

func (MangaStatus) String

func (m MangaStatus) String() string

func (*MangaStatus) UnmarshalJSON

func (m *MangaStatus) UnmarshalJSON(b []byte) error

type MangaStatusType

type MangaStatusType string
const (
	// MangaStatusTypeFinished Finished
	MangaStatusTypeFinished MangaStatusType = "Finished"
	// MangaStatusTypePublishing Publishing
	MangaStatusTypePublishing MangaStatusType = "Publishing"
	// MangaStatusTypeOnHiatus On Hiatus
	MangaStatusTypeOnHiatus MangaStatusType = "On Hiatus"
	// MangaStatusTypeDiscontinued Discontinued
	MangaStatusTypeDiscontinued MangaStatusType = "Discontinued"
	// MangaStatusTypeNotYetPublished Not yet published
	MangaStatusTypeNotYetPublished MangaStatusType = "Not yet published"
)

func (MangaStatusType) String

func (m MangaStatusType) String() string

func (*MangaStatusType) UnmarshalJSON

func (m *MangaStatusType) UnmarshalJSON(b []byte) error

type MangaType

type MangaType string
const (
	// MangaTypeManga Manga
	MangaTypeManga MangaType = "Manga"
	// MangaTypeNovel Novel
	MangaTypeNovel MangaType = "Novel"
	// MangaTypeLightNovel Light Novel
	MangaTypeLightNovel MangaType = "Light Novel"
	// MangaTypeOneShot One Shot
	MangaTypeOneShot MangaType = "One-shot"
	// MangaTypeDoujinshi Doujinshi
	MangaTypeDoujinshi MangaType = "Doujinshi"
	// MangaTypeManhua Manhua
	MangaTypeManhua MangaType = "Manhua"
	// MangaTypeManhwa Manhwa
	MangaTypeManhwa MangaType = "Manhwa"
	// MangaTypeOEL OEL
	MangaTypeOEL MangaType = "OEL"
)

func (MangaType) String

func (m MangaType) String() string

func (*MangaType) UnmarshalJSON

func (m *MangaType) UnmarshalJSON(b []byte) error

type OrderByAnime

type OrderByAnime string
const (
	// OrderByAnimeMalId MyAnimeList ID
	OrderByAnimeMalId OrderByAnime = "mal_id"
	// OrderByAnimeTitle Title
	OrderByAnimeTitle OrderByAnime = "title"
	// OrderByAnimeStartDate Start Date
	OrderByAnimeStartDate OrderByAnime = "start_date"
	// OrderByAnimeEndDate End Date
	OrderByAnimeEndDate OrderByAnime = "end_date"
	// OrderByAnimeEpisodes Episodes
	OrderByAnimeEpisodes OrderByAnime = "episodes"
	// OrderByAnimeScore Score
	OrderByAnimeScore OrderByAnime = "score"
	// OrderByAnimeScoredBy Scored By
	OrderByAnimeScoredBy OrderByAnime = "scored_by"
	// OrderByAnimeRank Rank
	OrderByAnimeRank OrderByAnime = "rank"
	// OrderByAnimePopularity Popularity
	OrderByAnimePopularity OrderByAnime = "popularity"
	// OrderByAnimeMembers Members
	OrderByAnimeMembers OrderByAnime = "members"
	// OrderByAnimeFavorites Favorites
	OrderByAnimeFavorites OrderByAnime = "favorites"
)

func (OrderByAnime) String

func (o OrderByAnime) String() string

func (*OrderByAnime) UnmarshalJSON

func (o *OrderByAnime) UnmarshalJSON(b []byte) error

type Pagination

type Pagination struct {
	LastVisiblePage int  `json:"last_visible_page"`
	HasNextPage     bool `json:"has_next_page"`
}

Pagination represents the pagination information in the API response.

type PeopleImages

type PeopleImages struct {
	Jpg *Jpg `json:"jpg,omitempty"`
}

type PeopleOrderBy

type PeopleOrderBy string
const (
	// PeopleOrderByMalId MyAnimeList ID
	PeopleOrderByMalId PeopleOrderBy = "mal_id"
	// PeopleOrderByName Name
	PeopleOrderByName PeopleOrderBy = "name"
	// PeopleOrderByBirthday Birthday
	PeopleOrderByBirthday PeopleOrderBy = "birthday"
	// PeopleOrderByFavorites Favorites
	PeopleOrderByFavorites PeopleOrderBy = "favorites"
)

func (PeopleOrderBy) String

func (p PeopleOrderBy) String() string

func (*PeopleOrderBy) UnmarshalJSON

func (p *PeopleOrderBy) UnmarshalJSON(b []byte) error

type PeopleStatus

type PeopleStatus string
const (
	// PeopleStatusActive Active
	PeopleStatusActive PeopleStatus = "active"
	// PeopleStatusRetired Retired
	PeopleStatusRetired PeopleStatus = "retired"
	// PeopleStatusUnknown Unknown
	PeopleStatusUnknown PeopleStatus = "unknown"
	// PeopleStatusDeceased Deceased
	PeopleStatusDeceased PeopleStatus = "deceased"
	// PeopleStatusOther Other
	PeopleStatusOther PeopleStatus = "other"
)

func (PeopleStatus) String

func (p PeopleStatus) String() string

func (*PeopleStatus) UnmarshalJSON

func (p *PeopleStatus) UnmarshalJSON(b []byte) error

type Prop

type Prop struct {
	From *Date `json:"from,omitempty"`
	To   *Date `json:"to,omitempty"`
	// Raw parsed string
	String string `json:"string,omitempty"`
}

Prop Date Prop

type QueryCategory

type QueryCategory string
const (
	// QueryCategoryAnime Anime
	QueryCategoryAnime QueryCategory = "anime"
	// QueryCategoryManga Manga
	QueryCategoryManga QueryCategory = "manga"
	// QueryCategoryActorsAndArtists Actors and Artists
	QueryCategoryActorsAndArtists QueryCategory = "actors_and_artists"
	// QueryCategoryCharacters Characters
	QueryCategoryCharacters QueryCategory = "characters"
	// QueryCategoryCitiesAndNeighborhoods Cities and Neighborhoods
	QueryCategoryCitiesAndNeighborhoods QueryCategory = "cities_and_neighborhoods"
	// QueryCategoryCompanies Companies
	QueryCategoryCompanies QueryCategory = "companies"
	// QueryCategoryConventions Conventions
	QueryCategoryConventions QueryCategory = "conventions"
	// QueryCategoryGames Games
	QueryCategoryGames QueryCategory = "games"
	// QueryCategoryJapan Japan
	QueryCategoryJapan QueryCategory = "japan"
	// QueryCategoryMusic Music
	QueryCategoryMusic QueryCategory = "music"
	// QueryCategoryOther Other
	QueryCategoryOther QueryCategory = "other"
	// QueryCategorySchools Schools
	QueryCategorySchools QueryCategory = "schools"
)

func (QueryCategory) String

func (c QueryCategory) String() string

func (*QueryCategory) UnmarshalJSON

func (c *QueryCategory) UnmarshalJSON(b []byte) error

type Response

type Response[T any] struct {
	Data       T           `json:"data,omitempty"`
	Pagination *Pagination `json:"pagination,omitempty"`
}

type Season

type Season string
const (
	// SeasonWinter Winter season
	SeasonWinter Season = "winter"
	// SeasonSpring Spring season
	SeasonSpring Season = "spring"
	// SeasonSummer Summer season
	SeasonSummer Season = "summer"
	// SeasonFall Fall season
	SeasonFall Season = "fall"
)

func (Season) String

func (s Season) String() string

func (*Season) UnmarshalJSON

func (s *Season) UnmarshalJSON(b []byte) error

type SortDirection

type SortDirection string
const (
	// SortDirectionDesc Descending
	SortDirectionDesc SortDirection = "desc"
	// SortDirectionAsc Ascending
	SortDirectionAsc SortDirection = "asc"
)

func (SortDirection) String

func (s SortDirection) String() string

func (*SortDirection) UnmarshalJSON

func (s *SortDirection) UnmarshalJSON(b []byte) error

type Title

type Title struct {
	// Title type
	Type string `json:"type,omitempty"`
	// Title value
	Title string `json:"title,omitempty"`
}

Title Parsed Title Data

type TopAnimeFilter

type TopAnimeFilter string
const (
	// TopAnimeFilterAiring Airing
	TopAnimeFilterAiring TopAnimeFilter = "airing"
	// TopAnimeFilterUpcoming Upcoming
	TopAnimeFilterUpcoming TopAnimeFilter = "upcoming"
	// TopAnimeFilterByPopularity By Popularity
	TopAnimeFilterByPopularity TopAnimeFilter = "bypopularity"
	// TopAnimeFilterFavorite Favorite
	TopAnimeFilterFavorite TopAnimeFilter = "favorite"
)

func (TopAnimeFilter) String

func (t TopAnimeFilter) String() string

func (*TopAnimeFilter) UnmarshalJSON

func (t *TopAnimeFilter) UnmarshalJSON(b []byte) error

type TopMangaFilter

type TopMangaFilter string
const (
	// TopMangaFilterPublishing Publishing
	TopMangaFilterPublishing TopMangaFilter = "publishing"
	// TopMangaFilterUpcoming Upcoming
	TopMangaFilterUpcoming TopMangaFilter = "upcoming"
	// TopMangaFilterByPopularity By Popularity
	TopMangaFilterByPopularity TopMangaFilter = "bypopularity"
	// TopMangaFilterFavorite Favorite
	TopMangaFilterFavorite TopMangaFilter = "favorite"
)

func (TopMangaFilter) String

func (t TopMangaFilter) String() string

func (*TopMangaFilter) UnmarshalJSON

func (t *TopMangaFilter) UnmarshalJSON(b []byte) error

type TopReviewsType

type TopReviewsType string
const (
	// TopReviewsTypeAnime Anime
	TopReviewsTypeAnime TopReviewsType = "anime"
	// TopReviewsTypeManga Manga
	TopReviewsTypeManga TopReviewsType = "manga"
)

func (TopReviewsType) String

func (t TopReviewsType) String() string

func (*TopReviewsType) UnmarshalJSON

func (t *TopReviewsType) UnmarshalJSON(b []byte) error

type TrailerBase

type TrailerBase struct {
	// YouTube ID
	YoutubeId string `json:"youtube_id,omitempty"`
	// YouTube URL
	Url string `json:"url,omitempty"`
	// Parsed Embed URL
	EmbedUrl string `json:"embed_url,omitempty"`
}

TrailerBase Youtube Details

type UserMangaListStatusFilter

type UserMangaListStatusFilter string
const (
	// UserMangaListStatusFilterAll All
	UserMangaListStatusFilterAll UserMangaListStatusFilter = "all"
	// UserMangaListStatusFilterReading Reading
	UserMangaListStatusFilterReading UserMangaListStatusFilter = "reading"
	// UserMangaListStatusFilterCompleted Completed
	UserMangaListStatusFilterCompleted UserMangaListStatusFilter = "completed"
	// UserMangaListStatusFilterOnHold On Hold
	UserMangaListStatusFilterOnHold UserMangaListStatusFilter = "onhold"
	// UserMangaListStatusFilterDropped Dropped
	UserMangaListStatusFilterDropped UserMangaListStatusFilter = "dropped"
	// UserMangaListStatusFilterPlanToRead Plan to Read
	UserMangaListStatusFilterPlanToRead UserMangaListStatusFilter = "plantoread"
)

func (UserMangaListStatusFilter) String

func (u UserMangaListStatusFilter) String() string

func (*UserMangaListStatusFilter) UnmarshalJSON

func (u *UserMangaListStatusFilter) UnmarshalJSON(b []byte) error

type Webp

type Webp struct {
	// Image URL WEBP
	ImageUrl string `json:"image_url,omitempty"`
	// Small Image URL WEBP
	SmallImageUrl string `json:"small_image_url,omitempty"`
	// Image URL WEBP
	LargeImageUrl string `json:"large_image_url,omitempty"`
}

Webp Available images in WEBP

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL