Documentation ¶
Overview ¶
Package jikan provides Jikan API bindings for Go. Please note that all functions/structs are named in accordance to Jikan's endpoints/responses
Index ¶
- Variables
- func Initialize(cfg Config)
- type AnimeBase
- type AnimeById
- type AnimeCharacters
- type AnimeEpisodeById
- type AnimeEpisodes
- type AnimeExternal
- type AnimeForum
- type AnimeForumFilter
- type AnimeMoreInfo
- type AnimeNews
- type AnimePictures
- type AnimeRecommendations
- type AnimeRelations
- type AnimeReviews
- type AnimeSearch
- type AnimeStaff
- type AnimeStatistics
- type AnimeThemes
- type AnimeUserUpdates
- type AnimeVideos
- type CharacterAnime
- type CharacterById
- type CharacterManga
- type CharacterPictures
- type CharacterVoiceActors
- type CharactersBase
- type CharactersSearch
- type ClubMembers
- type ClubRelations
- type ClubStaff
- type ClubsBase
- type ClubsById
- type ClubsSearch
- type Comment
- type Config
- type DateRange
- type EntryName2
- type EntryTitle3
- type GenreFilter
- type Genres
- type Images1
- type Images2
- type Images3
- type Magazines
- type MalItem
- type MalItemCount
- type MangaBase
- type MangaById
- type MangaCharacters
- type MangaExternal
- type MangaForum
- type MangaForumFilter
- type MangaMoreInfo
- type MangaNews
- type MangaPictures
- type MangaRecommendations
- type MangaRelations
- type MangaReviews
- type MangaSearch
- type MangaStatistics
- type MangaUserUpdates
- type Pagination
- type PeopleBase
- type PeopleSearch
- type PersonAnime
- type PersonById
- type PersonManga
- type PersonPictures
- type PersonVoices
- type Producers
- type RandomAnime
- type RandomCharacters
- type RandomManga
- type RandomPeople
- type RandomUsers
- type RecentAnimeReviews
- type RecentMangaReviews
- type RecentRecommendations
- type ScheduleFilter
- type Schedules
- type ScoresAnime
- type ScoresLong
- type ScoresManga
- type ScoresShort
- type Season
- type SeasonsList
- type TestServer
- type TopAnime
- type TopAnimeFilter
- type TopAnimeType
- type TopCharacters
- type TopManga
- type TopMangaFilter
- type TopMangaType
- type TopPeople
- type TopReviews
- type UserAbout
- type UserAnimelist
- type UserByID
- type UserClubs
- type UserFavorites
- type UserFriends
- type UserHistory
- type UserHistoryFilter
- type UserItem
- type UserMangalist
- type UserProfile
- type UserRecommendations
- type UserReviews
- type UserStatistics
- type UserUpdates
- type UsersBase
- type UsersSearch
- type WatchEpisodes
- type WatchPromos
Constants ¶
This section is empty.
Variables ¶
var (
Client *http.Client
)
Client is a *http.Client
var DefaultConfig = Config{
Endpoint: "https://api.jikan.moe/v4",
ClientTimeout: 60,
}
DefaultConfig provides default configuration values
Functions ¶
func Initialize ¶
func Initialize(cfg Config)
Initialize sets up the Jikan client with the provided configuration
Types ¶
type AnimeBase ¶
type AnimeBase struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images3 `json:"images"` Trailer struct { YoutubeID string `json:"youtube_id"` Url string `json:"url"` EmbedUrl string `json:"embed_url"` } `json:"trailer"` Title string `json:"title"` TitleEnglish string `json:"title_english"` TitleJapanese string `json:"title_japanese"` TitleSynonyms []string `json:"title_synonyms"` Type string `json:"type"` Source string `json:"source"` Episodes int `json:"episodes"` Status string `json:"status"` Airing bool `json:"airing"` Aired DateRange `json:"aired"` Duration string `json:"duration"` Rating string `json:"rating"` Score float64 `json:"score"` AnilistScore float64 `json:"anilist_score"` ScoredBy int `json:"scored_by"` Rank int `json:"rank"` Popularity int `json:"popularity"` Members int `json:"members"` Favorites int `json:"favorites"` Synopsis string `json:"synopsis"` Background string `json:"background"` Season string `json:"season"` Year int `json:"year"` Broadcast struct { Day string `json:"day"` Time string `json:"time"` Timezone string `json:"timezone"` String string `json:"string"` } `json:"broadcast"` Producers []MalItem `json:"producers"` Licensors []MalItem `json:"licensors"` Studios []MalItem `json:"studios"` Genres []MalItem `json:"genres"` ExplicitGenres []MalItem `json:"explicit_genres"` Themes []MalItem `json:"themes"` Demographics []MalItem `json:"demographics"` }
type AnimeCharacters ¶
type AnimeCharacters struct { Data []struct { Character struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images2 `json:"images"` Name string `json:"name"` } `json:"character"` Role string `json:"role"` VoiceActors []struct { Person struct { MalId int `json:"mal_id"` Url string `json:"url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Name string `json:"name"` } `json:"person"` Language string `json:"language"` } `json:"voice_actors"` } `json:"data"` }
AnimeCharacters struct
func GetAnimeCharacters ¶
func GetAnimeCharacters(id int) (*AnimeCharacters, error)
GetAnimeCharacters returns anime characters
type AnimeEpisodeById ¶
type AnimeEpisodeById struct { Data struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` TitleJapanese string `json:"title_japanese"` TitleRomanji string `json:"title_romanji"` Duration int `json:"duration"` Aired time.Time `json:"aired"` Filler bool `json:"filler"` Recap bool `json:"recap"` Synopsis string `json:"synopsis"` } `json:"data"` }
AnimeEpisodeById struct
func GetAnimeEpisodeById ¶
func GetAnimeEpisodeById(id, episode int) (*AnimeEpisodeById, error)
GetAnimeEpisodeById returns anime episodes
type AnimeEpisodes ¶
type AnimeEpisodes struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` TitleJapanese string `json:"title_japanese"` TitleRomanji string `json:"title_romanji"` Duration int `json:"duration"` Aired time.Time `json:"aired"` Filler bool `json:"filler"` Recap bool `json:"recap"` ForumUrl string `json:"forum_url"` } `json:"data"` Pagination Pagination `json:"pagination"` }
AnimeEpisodes struct
func GetAnimeEpisodes ¶
func GetAnimeEpisodes(id, page int) (*AnimeEpisodes, error)
GetAnimeEpisodes returns anime episodes
type AnimeExternal ¶
type AnimeExternal struct { Data []struct { Name string `json:"name"` Url string `json:"url"` } `json:"data"` }
AnimeExternal struct
func GetAnimeExternal ¶
func GetAnimeExternal(id int) (*AnimeExternal, error)
GetAnimeExternal returns anime external
type AnimeForum ¶
type AnimeForum struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` Date time.Time `json:"date"` AuthorUsername string `json:"author_username"` AuthorUrl string `json:"author_url"` Comments int `json:"comments"` LastComment Comment `json:"last_comment"` } `json:"data"` }
AnimeForum struct
func GetAnimeForum ¶
func GetAnimeForum(id int, filter AnimeForumFilter) (*AnimeForum, error)
GetAnimeForum returns anime forum
type AnimeForumFilter ¶
type AnimeForumFilter string
const ( AnimeForumFilterAll AnimeForumFilter = "all" AnimeForumFilterEpisode AnimeForumFilter = "episode" AnimeForumFilterOther AnimeForumFilter = "other" )
type AnimeMoreInfo ¶
type AnimeMoreInfo struct { Data struct { Moreinfo string `json:"moreinfo"` } `json:"data"` }
AnimeMoreInfo struct
func GetAnimeMoreInfo ¶
func GetAnimeMoreInfo(id int) (*AnimeMoreInfo, error)
GetAnimeMoreInfo returns anime more info
type AnimeNews ¶
type AnimeNews struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` Date time.Time `json:"date"` AuthorUsername string `json:"author_username"` AuthorUrl string `json:"author_url"` ForumUrl string `json:"forum_url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Comments int `json:"comments"` Excerpt string `json:"excerpt"` } `json:"data"` Pagination Pagination `json:"pagination"` }
AnimeNews struct
func GetAnimeNews ¶
GetAnimeNews returns anime news
type AnimePictures ¶
type AnimePictures struct { Data []struct { Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` } `json:"data"` }
AnimePictures struct
func GetAnimePictures ¶
func GetAnimePictures(id int) (*AnimePictures, error)
GetAnimePictures returns anime pictures
type AnimeRecommendations ¶
type AnimeRecommendations struct { Data []struct { Entry EntryTitle3 `json:"entry"` Url string `json:"url"` Votes int `json:"votes"` } `json:"data"` }
AnimeRecommendations struct
func GetAnimeRecommendations ¶
func GetAnimeRecommendations(id int) (*AnimeRecommendations, error)
GetAnimeRecommendations returns anime recommendations
type AnimeRelations ¶
type AnimeRelations struct { Data []struct { Relation string `json:"relation"` Entry []MalItem `json:"entry"` } `json:"data"` }
AnimeRelations struct
func GetAnimeRelations ¶
func GetAnimeRelations(id int) (*AnimeRelations, error)
GetAnimeRelations returns anime relations
type AnimeReviews ¶
type AnimeReviews struct { Data []struct { User UserItem `json:"user"` MalId int `json:"mal_id"` Url string `json:"url"` Type string `json:"type"` Votes int `json:"votes"` Date time.Time `json:"date"` Review string `json:"review"` EpisodesWatched int `json:"episodes_watched"` Scores struct { Overall int `json:"overall"` Story int `json:"story"` Animation int `json:"animation"` Sound int `json:"sound"` Character int `json:"character"` Enjoyment int `json:"enjoyment"` } `json:"scores"` } `json:"data"` Pagination Pagination `json:"pagination"` }
AnimeReviews struct
func GetAnimeReviews ¶
func GetAnimeReviews(id, page int) (*AnimeReviews, error)
GetAnimeReviews returns anime reviews
type AnimeSearch ¶
type AnimeSearch struct { Data []AnimeBase `json:"data"` Pagination Pagination `json:"pagination"` }
AnimeSearch struct
func GetAnimeSearch ¶
func GetAnimeSearch(query url.Values) (*AnimeSearch, error)
GetAnimeSearch returns anime search
type AnimeStaff ¶
type AnimeStaff struct { Data []struct { Person struct { MalId int `json:"mal_id"` Url string `json:"url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Name string `json:"name"` } `json:"person"` Positions []string `json:"positions"` } `json:"data"` }
AnimeStaff struct
func GetAnimeStaff ¶
func GetAnimeStaff(id int) (*AnimeStaff, error)
GetAnimeStaff returns anime staff
type AnimeStatistics ¶
type AnimeStatistics struct { Data struct { Watching int `json:"watching"` Completed int `json:"completed"` OnHold int `json:"on_hold"` Dropped int `json:"dropped"` PlanToWatch int `json:"plan_to_watch"` Total int `json:"total"` Scores []ScoresShort `json:"scores"` } `json:"data"` }
AnimeStatistics struct
func GetAnimeStatistics ¶
func GetAnimeStatistics(id int) (*AnimeStatistics, error)
GetAnimeStatistics returns anime statistics
type AnimeThemes ¶
type AnimeThemes struct { Data struct { Openings []string `json:"openings"` Endings []string `json:"endings"` } `json:"data"` }
AnimeThemes struct
func GetAnimeThemes ¶
func GetAnimeThemes(id int) (*AnimeThemes, error)
GetAnimeThemes returns anime themes
type AnimeUserUpdates ¶
type AnimeUserUpdates struct { Data []struct { User UserItem `json:"user"` Score float64 `json:"score"` Status string `json:"status"` EpisodesSeen int `json:"episodes_seen"` EpisodesTotal int `json:"episodes_total"` Date string `json:"date"` } `json:"data"` Pagination Pagination `json:"pagination"` }
AnimeUserUpdates struct
func GetAnimeUserUpdates ¶
func GetAnimeUserUpdates(id, page int) (*AnimeUserUpdates, error)
GetAnimeUserUpdates returns anime user updates
type AnimeVideos ¶
type AnimeVideos struct { Data struct { Promos []struct { Title string `json:"title"` Trailer struct { YoutubeId string `json:"youtube_id"` Url string `json:"url"` EmbedUrl string `json:"embed_url"` Images struct { DefaultImageUrl string `json:"default_image_url"` SmallImageUrl string `json:"small_image_url"` MediumImageUrl string `json:"medium_image_url"` LargeImageUrl string `json:"large_image_url"` MaximumImageUrl string `json:"maximum_image_url"` } `json:"images"` } `json:"trailer"` } `json:"promos"` Episodes []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` Episode string `json:"episode"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` } `json:"episodes"` } `json:"data"` }
AnimeVideos struct
func GetAnimeVideos ¶
func GetAnimeVideos(id int) (*AnimeVideos, error)
GetAnimeVideos returns anime videos
type CharacterAnime ¶
type CharacterAnime struct { Data []struct { Role string `json:"role"` Anime EntryTitle3 `json:"anime"` } `json:"data"` }
CharacterAnime struct
func GetCharacterAnime ¶
func GetCharacterAnime(id int) (*CharacterAnime, error)
GetCharacterAnime returns character anime
type CharacterById ¶
type CharacterById struct {
Data CharactersBase `json:"data"`
}
CharacterById struct
func GetCharacterById ¶
func GetCharacterById(id int) (*CharacterById, error)
GetCharacterById returns character by id
type CharacterManga ¶
type CharacterManga struct { Data []struct { Role string `json:"role"` Manga EntryTitle3 `json:"manga"` } `json:"data"` }
CharacterManga struct
func GetCharacterManga ¶
func GetCharacterManga(id int) (*CharacterManga, error)
GetCharacterManga returns character manga
type CharacterPictures ¶
type CharacterPictures struct { Data []struct { ImageUrl string `json:"image_url"` LargeImageUrl string `json:"large_image_url"` } `json:"data"` }
func GetCharacterPictures ¶
func GetCharacterPictures(id int) (*CharacterPictures, error)
GetCharacterPictures returns character manga
type CharacterVoiceActors ¶
type CharacterVoiceActors struct { Data []struct { Language string `json:"language"` Person struct { MalId int `json:"mal_id"` Url string `json:"url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Name string `json:"name"` } `json:"person"` } `json:"data"` }
CharacterVoiceActors struct
func GetCharacterVoiceActors ¶
func GetCharacterVoiceActors(id int) (*CharacterVoiceActors, error)
GetCharacterVoiceActors returns character manga
type CharactersBase ¶
type CharactersBase struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images2 `json:"images"` Name string `json:"name"` NameKanji string `json:"name_kanji"` Nicknames []string `json:"nicknames"` Favorites int `json:"favorites"` About string `json:"about"` }
CharactersBase struct
type CharactersSearch ¶
type CharactersSearch struct { Data []CharacterById `json:"data"` Pagination Pagination `json:"pagination"` }
CharactersSearch struct
func GetCharactersSearch ¶
func GetCharactersSearch(query url.Values) (*CharactersSearch, error)
GetCharactersSearch returns characters search
type ClubMembers ¶
type ClubMembers struct { Data []UserItem `json:"data"` Pagination Pagination `json:"pagination"` }
func GetClubMembers ¶
func GetClubMembers(id, page int) (*ClubMembers, error)
GetClubMembers returns club members
type ClubRelations ¶
type ClubRelations struct { Data struct { Anime []MalItem `json:"anime"` Manga []MalItem `json:"manga"` Characters []MalItem `json:"characters"` } `json:"data"` }
ClubRelations struct
func GetClubRelations ¶
func GetClubRelations(id int) (*ClubRelations, error)
GetClubRelations returns club relations
type ClubStaff ¶
type ClubStaff struct { Data []struct { Url string `json:"url"` Username string `json:"username"` } `json:"data"` }
ClubStaff struct
type ClubsBase ¶
type ClubsBase struct { MalId int `json:"mal_id"` Name string `json:"name"` Url string `json:"url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Members int `json:"members"` Category string `json:"category"` Created time.Time `json:"created"` Access string `json:"access"` }
ClubsBase struct
type ClubsSearch ¶
type ClubsSearch struct { Data []ClubsBase `json:"data"` Pagination Pagination `json:"pagination"` }
ClubsSearch struct
func GetClubsSearch ¶
func GetClubsSearch(query url.Values) (*ClubsSearch, error)
GetClubsSearch returns clubs search
type Comment ¶
type Comment struct { Url string `json:"url"` AuthorUsername string `json:"author_username"` AuthorUrl string `json:"author_url"` Date time.Time `json:"date"` }
Comment struct
type Config ¶
type Config struct { // Endpoint points to Jikan API Endpoint string // ClientTimeout specifies the timeout value in seconds for the http client ClientTimeout int }
Config holds the Jikan client configuration
type DateRange ¶
type DateRange struct { From time.Time `json:"from"` To time.Time `json:"to"` Prop struct { From struct { Day int `json:"day"` Month int `json:"month"` Year int `json:"year"` } `json:"from"` To struct { Day int `json:"day"` Month int `json:"month"` Year int `json:"year"` } `json:"to"` String string `json:"string"` } `json:"prop"` }
DateRange struct
type EntryName2 ¶
type EntryName2 struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images2 `json:"images"` Name string `json:"title"` }
EntryName2 struct
type EntryTitle3 ¶
type EntryTitle3 struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images3 `json:"images"` Title string `json:"title"` }
EntryTitle3 struct
type GenreFilter ¶
type GenreFilter string
const ( GenresFilterGenres GenreFilter = "genres" GenresFilterExplicitGenres GenreFilter = "explicit_genres" GenresFilterThemes GenreFilter = "themes" GenresFilterDemographics GenreFilter = "demographics" )
type Genres ¶
type Genres struct {
Data []MalItemCount `json:"data"`
}
Genres struct
func GetAnimeGenres ¶
func GetAnimeGenres(page, limit int, filter GenreFilter) (*Genres, error)
GetAnimeGenres returns anime genres
func GetMangaGenres ¶
func GetMangaGenres(page, limit int, filter GenreFilter) (*Genres, error)
GetMangaGenres returns manga genres
type Images1 ¶
type Images1 struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` Webp struct { ImageUrl string `json:"image_url"` } `json:"webp"` }
Images1 struct
type Images2 ¶
type Images2 struct { Jpg struct { ImageUrl string `json:"image_url"` SmallImageUrl string `json:"small_image_url"` } `json:"jpg"` Webp struct { ImageUrl string `json:"image_url"` SmallImageUrl string `json:"small_image_url"` } `json:"webp"` }
Images2 struct
type Images3 ¶
type Images3 struct { Jpg struct { ImageUrl string `json:"image_url"` SmallImageUrl string `json:"small_image_url"` LargeImageUrl string `json:"large_image_url"` } `json:"jpg"` Webp struct { ImageUrl string `json:"image_url"` SmallImageUrl string `json:"small_image_url"` LargeImageUrl string `json:"large_image_url"` } `json:"webp"` }
Images3 struct
type Magazines ¶
type Magazines struct { Data []MalItemCount `json:"data"` Pagination Pagination `json:"pagination"` }
Magazines struct
type MalItem ¶
type MalItem struct { MalId int `json:"mal_id"` Type string `json:"type"` Name string `json:"name"` Url string `json:"url"` }
MalItem struct
type MalItemCount ¶
type MalItemCount struct { MalId int `json:"mal_id"` Name string `json:"name"` Url string `json:"url"` Count int `json:"count"` }
MalItemCount struct
type MangaBase ¶
type MangaBase struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images3 `json:"images"` Title string `json:"title"` TitleEnglish string `json:"title_english"` TitleJapanese string `json:"title_japanese"` TitleSynonyms []string `json:"title_synonyms"` Type string `json:"type"` Chapters int `json:"chapters"` Volumes int `json:"volumes"` Status string `json:"status"` Publishing bool `json:"publishing"` Published DateRange `json:"published"` Score float64 `json:"score"` ScoredBy int `json:"scored_by"` Rank int `json:"rank"` Popularity int `json:"popularity"` Members int `json:"members"` Favorites int `json:"favorites"` Synopsis string `json:"synopsis"` Background string `json:"background"` Authors []MalItem `json:"authors"` Serializations []MalItem `json:"serializations"` Genres []MalItem `json:"genres"` ExplicitGenres []MalItem `json:"explicit_genres"` Themes []MalItem `json:"themes"` Demographics []MalItem `json:"demographics"` }
MangaBase struct
type MangaCharacters ¶
type MangaCharacters struct { Data []struct { Character struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images2 `json:"images"` Name string `json:"name"` } `json:"character"` Role string `json:"role"` } `json:"data"` }
MangaCharacters struct
func GetMangaCharacters ¶
func GetMangaCharacters(id int) (*MangaCharacters, error)
GetMangaCharacters returns manga characters
type MangaExternal ¶
type MangaExternal struct { Data []struct { Name string `json:"name"` Url string `json:"url"` } `json:"data"` }
MangaExternal struct
func GetMangaExternal ¶
func GetMangaExternal(id int) (*MangaExternal, error)
GetMangaExternal returns manga external
type MangaForum ¶
type MangaForum struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` Date time.Time `json:"date"` AuthorUsername string `json:"author_username"` AuthorUrl string `json:"author_url"` Comments int `json:"comments"` LastComment Comment `json:"last_comment"` } `json:"data"` }
MangaForum struct
func GetMangaForum ¶
func GetMangaForum(id int, filter MangaForumFilter) (*MangaForum, error)
GetMangaTopics returns manga forum
type MangaForumFilter ¶
type MangaForumFilter string
const ( MangaForumFilterAll MangaForumFilter = "all" MangaForumFilterEpisode MangaForumFilter = "episode" MangaForumFilterOther MangaForumFilter = "other" )
type MangaMoreInfo ¶
type MangaMoreInfo struct { Data struct { Moreinfo string `json:"moreinfo"` } `json:"data"` }
func GetMangaMoreInfo ¶
func GetMangaMoreInfo(id int) (*MangaMoreInfo, error)
GetMangaMoreInfo returns manga more info
type MangaNews ¶
type MangaNews struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` Date time.Time `json:"date"` AuthorUsername string `json:"author_username"` AuthorUrl string `json:"author_url"` ForumUrl string `json:"forum_url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Comments int `json:"comments"` Excerpt string `json:"excerpt"` } `json:"data"` Pagination Pagination `json:"pagination"` }
MangaNews struct
func GetMangaNews ¶
GetMangaNews returns manga news
type MangaPictures ¶
type MangaPictures struct {
Data []Images3 `json:"data"`
}
MangaPictures struct
func GetMangaPictures ¶
func GetMangaPictures(id int) (*MangaPictures, error)
GetMangaPictures returns manga pictures
type MangaRecommendations ¶
type MangaRecommendations struct { Data []struct { Entry EntryTitle3 `json:"entry"` Url string `json:"url"` Votes int `json:"votes"` } `json:"data"` }
MangaRecommendations struct
func GetMangaRecommendations ¶
func GetMangaRecommendations(id int) (*MangaRecommendations, error)
GetMangaRecommendations returns manga recommendations
type MangaRelations ¶
type MangaRelations struct { Data []struct { Relation string `json:"relation"` Entry []MalItem `json:"entry"` } `json:"data"` }
MangaRelations struct
func GetMangaRelations ¶
func GetMangaRelations(id int) (*MangaRelations, error)
GetMangaRelations returns manga relations
type MangaReviews ¶
type MangaReviews struct { Data []struct { User UserItem `json:"user"` MalId int `json:"mal_id"` Url string `json:"url"` Type string `json:"type"` Votes int `json:"votes"` Date time.Time `json:"date"` ChaptersRead int `json:"chapters_read"` Review string `json:"review"` Scores ScoresManga `json:"scores"` } `json:"data"` Pagination Pagination `json:"pagination"` }
MangaReviews struct
func GetMangaReviews ¶
func GetMangaReviews(id, page int) (*MangaReviews, error)
GetMangaReviews returns manga reviews
type MangaSearch ¶
type MangaSearch struct { Data []MangaBase `json:"data"` Pagination Pagination `json:"pagination"` }
MangaSearch struct
func GetMangaSearch ¶
func GetMangaSearch(query url.Values) (*MangaSearch, error)
GetMangaSearch returns manga search
type MangaStatistics ¶
type MangaStatistics struct { Data struct { Reading int `json:"reading"` Completed int `json:"completed"` OnHold int `json:"on_hold"` Dropped int `json:"dropped"` PlanToRead int `json:"plan_to_read"` Total int `json:"total"` Scores []ScoresShort `json:"scores"` } `json:"data"` }
MangaStatistics struct
func GetMangaStatistics ¶
func GetMangaStatistics(id int) (*MangaStatistics, error)
GetMangaStatistics returns manga statistics
type MangaUserUpdates ¶
type MangaUserUpdates struct { Data []struct { User UserItem `json:"user"` Score float64 `json:"score"` Status string `json:"status"` VolumesRead int `json:"volumes_read"` VolumesTotal int `json:"volumes_total"` ChaptersRead int `json:"chapters_read"` ChaptersTotal int `json:"chapters_total"` Date time.Time `json:"date"` } `json:"data"` Pagination Pagination `json:"pagination"` }
MangaUserUpdates struct
func GetMangaUserUpdates ¶
func GetMangaUserUpdates(id, page int) (*MangaUserUpdates, error)
GetMangaUserUpdates returns manga user updates
type Pagination ¶
type Pagination struct { LastVisiblePage int `json:"last_visible_page"` HasNextPage bool `json:"has_next_page"` }
Pagination struct
type PeopleBase ¶
type PeopleBase struct { MalId int `json:"mal_id"` Url string `json:"url"` WebsiteUrl string `json:"website_url"` Images struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"images"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` AlternateNames []string `json:"alternate_names"` Birthday time.Time `json:"birthday"` Favorites int `json:"favorites"` About string `json:"about"` }
PeopleBase struct
type PeopleSearch ¶
type PeopleSearch struct { Data []PeopleBase `json:"data"` Pagination Pagination `json:"pagination"` }
PeopleSearch struct
func GetPeopleSearch ¶
func GetPeopleSearch(query url.Values) (*PeopleSearch, error)
GetPeopleSearch returns people search
type PersonAnime ¶
type PersonAnime struct { Data []struct { Position string `json:"position"` Anime EntryTitle3 `json:"anime"` } `json:"data"` }
PersonAnime struct
func GetPersonAnime ¶
func GetPersonAnime(id int) (*PersonAnime, error)
GetPersonAnime returns person anime
type PersonById ¶
type PersonById struct {
Data PeopleBase `json:"data"`
}
PersonById struct
func GetPersonById ¶
func GetPersonById(id int) (*PersonById, error)
GetPersonById returns person by id
type PersonManga ¶
type PersonManga struct { Data []struct { Position string `json:"position"` Manga EntryTitle3 `json:"manga"` } `json:"data"` }
PersonManga struct
func GetPersonManga ¶
func GetPersonManga(id int) (*PersonManga, error)
GetPersonManga returns person manga
type PersonPictures ¶
type PersonPictures struct { Data []struct { Jpg struct { ImageUrl string `json:"image_url"` } `json:"jpg"` } `json:"data"` }
PersonPictures struct
func GetPersonPictures ¶
func GetPersonPictures(id int) (*PersonPictures, error)
GetPersonPictures returns person pictures
type PersonVoices ¶
type PersonVoices struct { Data []struct { Role string `json:"role"` Anime EntryTitle3 `json:"anime"` Character EntryName2 `json:"character"` } `json:"data"` }
PersonVoices struct
func GetPersonVoices ¶
func GetPersonVoices(id int) (*PersonVoices, error)
GetPersonVoices returns person voices
type Producers ¶
type Producers struct { Data []MalItemCount `json:"data"` Pagination Pagination `json:"pagination"` }
Producers struct
type RandomAnime ¶
type RandomAnime struct {
Data AnimeBase `json:"data"`
}
RandomAnime struct
func GetRandomAnime ¶
func GetRandomAnime() (*RandomAnime, error)
GetRandomAnime returns random anime
type RandomCharacters ¶
type RandomCharacters struct {
Data CharactersBase `json:"data"`
}
RandomCharacters struct
func GetRandomCharacters ¶
func GetRandomCharacters() (*RandomCharacters, error)
GetRandomCharacters returns random characters
type RandomManga ¶
type RandomManga struct {
Data MangaBase `json:"data"`
}
RandomManga struct
func GetRandomManga ¶
func GetRandomManga() (*RandomManga, error)
GetRandomManga returns random manga
type RandomPeople ¶
type RandomPeople struct {
Data PeopleBase `json:"data"`
}
RandomPeople struct
func GetRandomPeople ¶
func GetRandomPeople() (*RandomPeople, error)
GetRandomPeople returns random people
type RandomUsers ¶
type RandomUsers struct {
Data UsersBase `json:"data"`
}
RandomUsers struct
func GetRandomUsers ¶
func GetRandomUsers() (*RandomUsers, error)
GetRandomUsers returns random users
type RecentAnimeReviews ¶
type RecentAnimeReviews struct { Data []struct { User UserItem `json:"user"` Anime EntryTitle3 `json:"anime"` MalId int `json:"mal_id"` Url string `json:"url"` Type string `json:"type"` Votes int `json:"votes"` Date time.Time `json:"date"` Review string `json:"review"` EpisodesWatched int `json:"episodes_watched"` Scores ScoresAnime `json:"scores"` } `json:"data"` Pagination Pagination `json:"pagination"` }
RecentAnimeReviews struct
func GetRecentAnimeReviews ¶
func GetRecentAnimeReviews() (*RecentAnimeReviews, error)
GetRecentAnimeReviews returns recent anime reviews
type RecentMangaReviews ¶
type RecentMangaReviews struct { Data []struct { User UserItem `json:"user"` Manga EntryTitle3 `json:"manga"` MalId int `json:"mal_id"` Url string `json:"url"` Type string `json:"type"` Votes int `json:"votes"` Date time.Time `json:"date"` ChaptersRead int `json:"chapters_read"` Review string `json:"review"` Scores ScoresManga `json:"scores"` } `json:"data"` Pagination Pagination `json:"pagination"` }
RecentMangaReviews struct
func GetRecentMangaReviews ¶
func GetRecentMangaReviews() (*RecentMangaReviews, error)
GetRecentMangaReviews returns recent manga reviews
type RecentRecommendations ¶
type RecentRecommendations struct { Data []struct { MalId string `json:"mal_id"` Entry []EntryTitle3 `json:"entry"` Content string `json:"content"` User struct { Url string `json:"url"` Username string `json:"username"` } `json:"user"` } `json:"data"` Pagination Pagination `json:"pagination"` }
RecentRecommendations struct
func GetRecentAnimeRecommendations ¶
func GetRecentAnimeRecommendations() (*RecentRecommendations, error)
GetRecentAnimeRecommendations returns recent anime recommendations
func GetRecentMangaRecommendations ¶
func GetRecentMangaRecommendations() (*RecentRecommendations, error)
GetRecentMangaRecommendations returns recent manga recommendations
type ScheduleFilter ¶
type ScheduleFilter string
const ( ScheduleFilterMonday ScheduleFilter = "monday" ScheduleFilterTuesday ScheduleFilter = "tuesday" ScheduleFilterWednesday ScheduleFilter = "wednesday" ScheduleFilterThursday ScheduleFilter = "thursday" ScheduleFilterFriday ScheduleFilter = "friday" ScheduleFilterUnknown ScheduleFilter = "unknown" ScheduleFilterOther ScheduleFilter = "other" )
type Schedules ¶
type Schedules struct { Data []AnimeBase `json:"data"` Pagination Pagination `json:"pagination"` }
Schedules struct
func GetSchedules ¶
func GetSchedules(filter ScheduleFilter) (*Schedules, error)
GetSchedules returns schedules
type ScoresAnime ¶
type ScoresAnime struct { Overall int `json:"overall"` Story int `json:"story"` Animation int `json:"animation"` Sound int `json:"sound"` Character int `json:"character"` Enjoyment int `json:"enjoyment"` }
ScoresAnime struct
type ScoresLong ¶
type ScoresLong struct { Overall int `json:"overall"` Story int `json:"story"` Art int `json:"art"` Character int `json:"character"` Enjoyment int `json:"enjoyment"` Animation int `json:"animation"` Sound int `json:"sound"` }
ScoresLong struct
type ScoresManga ¶
type ScoresManga struct { Overall int `json:"overall"` Story int `json:"story"` Art int `json:"art"` Character int `json:"character"` Enjoyment int `json:"enjoyment"` }
ScoresManga struct
type ScoresShort ¶
type ScoresShort struct { Score float64 `json:"score"` Votes int `json:"votes"` Percentage float64 `json:"percentage"` }
ScoresShort struct
type Season ¶
type Season struct { Data []AnimeBase `json:"data"` Pagination Pagination `json:"pagination"` }
Season struct
func GetSeasonUpcoming ¶
GetSeasonUpcoming returns season upcoming
type SeasonsList ¶
type SeasonsList struct { Data []struct { Year int `json:"year"` Seasons []string `json:"seasons"` } `json:"data"` }
func GetSeasonsList ¶
func GetSeasonsList() (*SeasonsList, error)
GetSeasonsList returns seasons list
type TestServer ¶
TestServer represents a test server with its configuration
func NewTestServer ¶
func NewTestServer() *TestServer
NewTestServer creates a new test server with mock responses
func (*TestServer) Initialize ¶
func (ts *TestServer) Initialize()
Initialize initializes the client with the test server configuration
type TopAnime ¶
type TopAnime struct { Data []AnimeBase `json:"data"` Pagination Pagination `json:"pagination"` }
TopAnime struct
func GetTopAnime ¶
func GetTopAnime(subType TopAnimeType, filter TopAnimeFilter, page int) (*TopAnime, error)
GetTopAnime returns top anime
type TopAnimeFilter ¶
type TopAnimeFilter string
const ( TopAnimeFilterAiring TopAnimeFilter = "airing" TopAnimeFilterUpcoming TopAnimeFilter = "upcoming" TopAnimeFilterByPopularity TopAnimeFilter = "bypopularity" TopAnimeFilterFavorite TopAnimeFilter = "favorite" )
type TopAnimeType ¶
type TopAnimeType string
const ( TopAnimeTypeTv TopAnimeType = "tv" TopAnimeTypeMovie TopAnimeType = "movie" TopAnimeTypeOva TopAnimeType = "ova" TopAnimeTypeSpecial TopAnimeType = "special" TopAnimeTypeOna TopAnimeType = "ona" TopAnimeTypeMusic TopAnimeType = "music" )
type TopCharacters ¶
type TopCharacters struct { Data []CharactersBase `json:"data"` Pagination Pagination `json:"pagination"` }
TopCharacters struct
func GetTopCharacters ¶
func GetTopCharacters(page int) (*TopCharacters, error)
GetTopCharacters returns top characters
type TopManga ¶
type TopManga struct { Data []MangaBase `json:"data"` Pagination Pagination `json:"pagination"` }
TopManga struct
func GetTopManga ¶
func GetTopManga(subType TopMangaType, filter TopMangaFilter, page int) (*TopManga, error)
GetTopManga returns top manga
type TopMangaFilter ¶
type TopMangaFilter string
const ( TopMangaFilterPublishing TopMangaFilter = "publishing" TopMangaFilterUpcoming TopMangaFilter = "upcoming" TopMangaFilterByPopularity TopMangaFilter = "bypopularity" TopMangaFilterFavorite TopMangaFilter = "favorite" )
type TopMangaType ¶
type TopMangaType string
const ( TopMangaTypeManga TopMangaType = "manga" TopMangaTypeNodel TopMangaType = "novel" TopMangaTypeLightnovel TopMangaType = "lightnovel" TopMangaTypeOneshot TopMangaType = "oneshot" TopMangaTypeDoujin TopMangaType = "doujin" TopMangaTypeManhwa TopMangaType = "manhwa" TopMangaTypeManhua TopMangaType = "manhua" )
type TopPeople ¶
type TopPeople struct { Data []PeopleBase `json:"data"` Pagination Pagination `json:"pagination"` }
TopPeople struct
type TopReviews ¶
type TopReviews struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Type string `json:"type"` Votes int `json:"votes"` Date time.Time `json:"date"` Review string `json:"review"` EpisodesWatched int `json:"episodes_watched"` Scores ScoresLong `json:"scores"` Entry EntryTitle3 `json:"entry"` User UserItem `json:"user"` ChaptersRead int `json:"chapters_read"` } `json:"data"` Pagination Pagination `json:"pagination"` }
TopReviews struct
func GetTopReviews ¶
func GetTopReviews(page int) (*TopReviews, error)
GetTopReviews returns top reviews
type UserAbout ¶
type UserAbout struct { Data struct { About string `json:"about"` } `json:"data"` }
UserAbout struct
func GetUserAbout ¶
GetUserAbout returns user about
type UserAnimelist ¶
type UserAnimelist struct { Data []struct { WatchingStatus int `json:"watching_status"` Score float64 `json:"score"` EpisodesWatched int `json:"episodes_watched"` Tags string `json:"tags"` IsRewatching bool `json:"is_rewatching"` WatchStartDate time.Time `json:"watch_start_date"` WatchEndDate time.Time `json:"watch_end_date"` Days int `json:"days"` Storage string `json:"storage"` Priority string `json:"priority"` Anime AnimeBase `json:"anime"` } `json:"data"` }
UserAnimelist struct Deprecated: Anime lists will be discontinued from May 1st, 2022.
func GetUserAnimelist ¶
func GetUserAnimelist(username string) (*UserAnimelist, error)
GetUserAnimelist returns user animelist Deprecated: Anime lists will be discontinued from May 1st, 2022.
type UserClubs ¶
type UserClubs struct { Data []struct { MalId int `json:"mal_id"` Name string `json:"name"` Url string `json:"url"` } `json:"data"` Pagination Pagination `json:"pagination"` }
UserClubs struct
func GetUserClubs ¶
GetUserClubs returns user clubs
type UserFavorites ¶
type UserFavorites struct { Data struct { Anime []struct { Type string `json:"type"` StartYear int `json:"start_year"` MalId int `json:"mal_id"` Url string `json:"url"` Images Images3 `json:"images"` Title string `json:"title"` } `json:"anime"` Manga []struct { Type string `json:"type"` StartYear int `json:"start_year"` MalId int `json:"mal_id"` Url string `json:"url"` Images Images3 `json:"images"` Title string `json:"title"` } `json:"manga"` Characters []struct { MalId int `json:"mal_id"` Url string `json:"url"` Images Images2 `json:"images"` Name string `json:"name"` } `json:"characters"` People []EntryName2 `json:"people"` } `json:"data"` }
UserFavorites struct
func GetUserFavorites ¶
func GetUserFavorites(username string) (*UserFavorites, error)
GetUserFavorites returns user favorites
type UserFriends ¶
type UserFriends struct { Data []struct { User UserItem `json:"user"` LastOnline time.Time `json:"last_online"` FriendsSince time.Time `json:"friends_since"` } `json:"data"` Pagination Pagination `json:"pagination"` }
UserFriends struct
func GetUserFriends ¶
func GetUserFriends(username string) (*UserFriends, error)
GetUserFriends returns user friends
type UserHistory ¶
type UserHistory struct { Data []struct { Entry MalItem `json:"entry"` Increment int `json:"increment"` Date time.Time `json:"date"` } `json:"data"` }
UserHistory struct
func GetUserHistory ¶
func GetUserHistory(username string, filter UserHistoryFilter) (*UserHistory, error)
GetUserHistory returns user history
type UserHistoryFilter ¶
type UserHistoryFilter string
const ( UserHistoryFilterAnime UserHistoryFilter = "anime" UserHistoryFilterManga UserHistoryFilter = "manga" )
type UserItem ¶
type UserItem struct { Username string `json:"username"` Url string `json:"url"` Images Images1 `json:"images"` }
UserItem struct
type UserMangalist ¶
type UserMangalist struct { Data []struct { ReadingStatus int `json:"reading_status"` Score float64 `json:"score"` ChaptersRead int `json:"chapters_read"` VolumesRead int `json:"volumes_read"` Tags string `json:"tags"` IsRereading bool `json:"is_rereading"` ReadStartDate time.Time `json:"read_start_date"` ReadEndDate time.Time `json:"read_end_date"` Days int `json:"days"` Retail int `json:"retail"` Priority string `json:"priority"` Manga MangaBase `json:"manga"` } `json:"data"` }
UserMangalist struct Deprecated: Manga lists will be discontinued from May 1st, 2022.
func GetUserMangalist ¶
func GetUserMangalist(username string) (*UserMangalist, error)
GetUserMangalist returns user mangalist Deprecated: Manga lists will be discontinued from May 1st, 2022.
type UserProfile ¶
type UserProfile struct { MalId int `json:"mal_id"` Username string `json:"username"` Url string `json:"url"` Images Images1 `json:"images"` LastOnline time.Time `json:"last_online"` Gender string `json:"gender"` Birthday time.Time `json:"birthday"` Location string `json:"location"` Joined time.Time `json:"joined"` }
UserProfile struct
func GetUserProfile ¶
func GetUserProfile(username string) (*UserProfile, error)
GetUserProfile returns user profile
type UserRecommendations ¶
type UserRecommendations struct { Data []struct { MalId string `json:"mal_id"` Entry []EntryTitle3 `json:"entry"` Content string `json:"content"` User struct { Url string `json:"url"` Username string `json:"username"` } `json:"user"` } `json:"data"` Pagination Pagination `json:"pagination"` }
UserRecommendations struct
func GetUserRecommendations ¶
func GetUserRecommendations(username string) (*UserRecommendations, error)
GetUserRecommendations returns user recommendations
type UserReviews ¶
type UserReviews struct { Data []struct { MalId int `json:"mal_id"` Url string `json:"url"` Type string `json:"type"` Votes int `json:"votes"` Date time.Time `json:"date"` Review string `json:"review"` ChaptersRead int `json:"chapters_read"` Scores ScoresLong `json:"scores"` Entry EntryTitle3 `json:"entry"` EpisodesWatched int `json:"episodes_watched"` } `json:"data"` Pagination Pagination `json:"pagination"` }
UserReviews struct
func GetUserReviews ¶
func GetUserReviews(username string) (*UserReviews, error)
GetUserReviews returns user reviews
type UserStatistics ¶
type UserStatistics struct { Data struct { Anime struct { DaysWatched float64 `json:"days_watched"` MeanScore float64 `json:"mean_score"` Watching int `json:"watching"` Completed int `json:"completed"` OnHold int `json:"on_hold"` Dropped int `json:"dropped"` PlanToWatch int `json:"plan_to_watch"` TotalEntries int `json:"total_entries"` Rewatched int `json:"rewatched"` EpisodesWatched int `json:"episodes_watched"` } `json:"anime"` Manga struct { DaysRead float64 `json:"days_read"` MeanScore float64 `json:"mean_score"` Reading int `json:"reading"` Completed int `json:"completed"` OnHold int `json:"on_hold"` Dropped int `json:"dropped"` PlanToRead int `json:"plan_to_read"` TotalEntries int `json:"total_entries"` Reread int `json:"reread"` ChaptersRead int `json:"chapters_read"` VolumesRead int `json:"volumes_read"` } `json:"manga"` } `json:"data"` }
UserStatistics struct
func GetUserStatistics ¶
func GetUserStatistics(username string) (*UserStatistics, error)
GetUserStatistics returns user statistics
type UserUpdates ¶
type UserUpdates struct { Data struct { Anime []struct { Entry EntryTitle3 `json:"entry"` Score float64 `json:"score"` Status string `json:"status"` EpisodesSeen int `json:"episodes_seen"` EpisodesTotal int `json:"episodes_total"` Date time.Time `json:"date"` } `json:"anime"` Manga []struct { Entry EntryTitle3 `json:"entry"` Score float64 `json:"score"` Status string `json:"status"` ChaptersRead int `json:"chapters_read"` ChaptersTotal int `json:"chapters_total"` VolumesRead int `json:"volumes_read"` VolumesTotal int `json:"volumes_total"` Date time.Time `json:"date"` } `json:"manga"` } `json:"data"` }
UserUpdates struct
func GetUserUpdates ¶
func GetUserUpdates(username string) (*UserUpdates, error)
GetUserUpdates returns user updates
type UsersBase ¶
type UsersBase struct { MalId int `json:"mal_id"` Username string `json:"username"` Url string `json:"url"` Images Images1 `json:"images"` LastOnline time.Time `json:"last_online"` Gender string `json:"gender"` Birthday time.Time `json:"birthday"` Location string `json:"location"` Joined time.Time `json:"joined"` }
UsersBase struct
type UsersSearch ¶
type UsersSearch struct { Data []struct { Username string `json:"username"` Url string `json:"url"` Images Images1 `json:"images"` LastOnline time.Time `json:"last_online"` } `json:"data"` Pagination Pagination `json:"pagination"` }
UsersSearch struct
func GetUsersSearch ¶
func GetUsersSearch(query url.Values) (*UsersSearch, error)
GetUsersSearch returns users search
type WatchEpisodes ¶
type WatchEpisodes struct { Data []struct { Entry EntryTitle3 `json:"entry"` Episodes []struct { MalId int `json:"mal_id"` Url string `json:"url"` Title string `json:"title"` Premium bool `json:"premium"` } `json:"episodes"` RegionLocked bool `json:"region_locked"` } `json:"data"` Pagination Pagination `json:"pagination"` }
WatchEpisodes struct
func GetWatchPopularEpisodes ¶
func GetWatchPopularEpisodes() (*WatchEpisodes, error)
GetWatchPopularEpisodes returns watch popular episodes
func GetWatchRecentEpisodes ¶
func GetWatchRecentEpisodes() (*WatchEpisodes, error)
GetWatchRecentEpisodes returns watch recent episodes
type WatchPromos ¶
type WatchPromos struct { Data []struct { Title string `json:"title"` Entry EntryTitle3 `json:"entry"` Trailer struct { YoutubeId string `json:"youtube_id"` Url string `json:"url"` EmbedUrl string `json:"embed_url"` Images struct { ImageUrl string `json:"image_url"` SmallImageUrl string `json:"small_image_url"` MediumImageUrl string `json:"medium_image_url"` LargeImageUrl string `json:"large_image_url"` MaximumImageUrl string `json:"maximum_image_url"` } `json:"images"` } `json:"trailer"` } `json:"data"` Pagination Pagination `json:"pagination"` }
WatchPromos struct
func GetWatchPopularPromos ¶
func GetWatchPopularPromos() (*WatchPromos, error)
GetWatchPopularPromos returns watch popular promos
func GetWatchRecentPromos ¶
func GetWatchRecentPromos() (*WatchPromos, error)
GetWatchRecentPromos returns watch recent promos