jikan

package module
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 7 Imported by: 8

README

Jikan-go

Go Reference Go Report Card

A Go wrapper for the Jikan v4 API.

Notice: Jikan v4 introduces breaking changes. You will need to make changes to your code when upgrading to v1.2.0+.

Documentation can be found at go.dev.

Installation

To install/update: go install github.com/darenliang/jikan-go@latest

To import: import "github.com/darenliang/jikan-go" and use as jikan

Usage
Basic Example
package main

import (
	"fmt"
	"github.com/darenliang/jikan-go"
)

func main() {
	// Get anime
	anime, err := jikan.GetAnimeById(1)
	if err != nil {
		panic(err)
	}
	fmt.Println(anime.Data.Title)
}
Output:

Cowboy Bebop
Search Query Example

Please refer to the official Jikan API documentation for clarification on query parameters.

package main

import (
	"fmt"
	"github.com/darenliang/jikan-go"
	"net/url"
)

func main() {
	// Setup query
	query := url.Values{}
	query.Set("q", "Cowboy Bebop")
	query.Set("type", "tv")

	// Search anime
	search, err := jikan.GetAnimeSearch(query)
	if err != nil {
		panic(err)
	}
	fmt.Println(search.Data[0].Score)
}
Output:

8.79
Troubleshooting

If it is necessary to modify the http client (eg. modify timeout), you can access the client via jikan.Client.

Example: setting the client timeout from 60 seconds (default) to 10 seconds.

jikan.Client.Timeout = time.Second * 10

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

Constants

View Source
const ClientTimeout = 60

ClientTimeout specifies the default timeout value in seconds for the http client

View Source
const Endpoint = "https://api.jikan.moe/v4"

Endpoint points to Jikan API

Variables

View Source
var Client *http.Client

Client is a *http.Client

Functions

This section is empty.

Types

type AnimeBase added in v1.2.0

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"`
	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 AnimeById added in v1.2.0

type AnimeById struct {
	Data AnimeBase `json:"data"`
}

AnimeById struct

func GetAnimeById added in v1.2.0

func GetAnimeById(id int) (*AnimeById, error)

GetAnimeById returns anime by id

type AnimeCharacters added in v1.2.0

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 added in v1.2.0

func GetAnimeCharacters(id int) (*AnimeCharacters, error)

GetAnimeCharacters returns anime characters

type AnimeEpisodeById added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

type AnimeExternal struct {
	Data []struct {
		Name string `json:"name"`
		Url  string `json:"url"`
	} `json:"data"`
}

AnimeExternal struct

func GetAnimeExternal added in v1.2.0

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 added in v1.2.0

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

func GetAnimeNews(id, page int) (*AnimeNews, error)

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 added in v1.2.0

type AnimeRelations struct {
	Data []struct {
		Relation string    `json:"relation"`
		Entry    []MalItem `json:"entry"`
	} `json:"data"`
}

AnimeRelations struct

func GetAnimeRelations added in v1.2.0

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 added in v1.2.0

type AnimeSearch struct {
	Data       []AnimeBase `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

AnimeSearch struct

func GetAnimeSearch added in v1.2.0

func GetAnimeSearch(query url.Values) (*AnimeSearch, error)

GetAnimeSearch returns anime search

type AnimeStaff added in v1.2.0

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 added in v1.2.0

func GetAnimeStaff(id int) (*AnimeStaff, error)

GetAnimeStaff returns anime staff

type AnimeStatistics added in v1.2.0

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 added in v1.2.0

func GetAnimeStatistics(id int) (*AnimeStatistics, error)

GetAnimeStatistics returns anime statistics

type AnimeThemes added in v1.2.0

type AnimeThemes struct {
	Data struct {
		Openings []string `json:"openings"`
		Endings  []string `json:"endings"`
	} `json:"data"`
}

AnimeThemes struct

func GetAnimeThemes added in v1.2.0

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 added in v1.2.0

type CharacterAnime struct {
	Data []struct {
		Role  string      `json:"role"`
		Anime EntryTitle3 `json:"anime"`
	} `json:"data"`
}

CharacterAnime struct

func GetCharacterAnime added in v1.2.0

func GetCharacterAnime(id int) (*CharacterAnime, error)

GetCharacterAnime returns character anime

type CharacterById added in v1.2.0

type CharacterById struct {
	Data CharactersBase `json:"data"`
}

CharacterById struct

func GetCharacterById added in v1.2.0

func GetCharacterById(id int) (*CharacterById, error)

GetCharacterById returns character by id

type CharacterManga added in v1.2.0

type CharacterManga struct {
	Data []struct {
		Role  string      `json:"role"`
		Manga EntryTitle3 `json:"manga"`
	} `json:"data"`
}

CharacterManga struct

func GetCharacterManga added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

func GetCharacterVoiceActors(id int) (*CharacterVoiceActors, error)

GetCharacterVoiceActors returns character manga

type CharactersBase added in v1.2.0

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 added in v1.2.0

type CharactersSearch struct {
	Data       []CharacterById `json:"data"`
	Pagination Pagination      `json:"pagination"`
}

CharactersSearch struct

func GetCharactersSearch added in v1.2.0

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 added in v1.2.0

type ClubRelations struct {
	Data struct {
		Anime      []MalItem `json:"anime"`
		Manga      []MalItem `json:"manga"`
		Characters []MalItem `json:"characters"`
	} `json:"data"`
}

ClubRelations struct

func GetClubRelations added in v1.2.0

func GetClubRelations(id int) (*ClubRelations, error)

GetClubRelations returns club relations

type ClubStaff added in v1.2.0

type ClubStaff struct {
	Data []struct {
		Url      string `json:"url"`
		Username string `json:"username"`
	} `json:"data"`
}

ClubStaff struct

func GetClubStaff added in v1.2.0

func GetClubStaff(id int) (*ClubStaff, error)

GetClubStaff returns club staff

type ClubsBase added in v1.2.0

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 ClubsById added in v1.2.0

type ClubsById struct {
	Data ClubsBase `json:"data"`
}

ClubsById struct

func GetClubsById added in v1.2.0

func GetClubsById(id int) (*ClubsById, error)

GetClubsById returns club by id

type ClubsSearch added in v1.2.0

type ClubsSearch struct {
	Data       []ClubsBase `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

ClubsSearch struct

func GetClubsSearch added in v1.2.0

func GetClubsSearch(query url.Values) (*ClubsSearch, error)

GetClubsSearch returns clubs search

type Comment added in v1.2.3

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 DateRange added in v1.2.3

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 added in v1.2.3

type EntryName2 struct {
	MalId  int     `json:"mal_id"`
	Url    string  `json:"url"`
	Images Images2 `json:"images"`
	Name   string  `json:"title"`
}

EntryName2 struct

type EntryTitle3 added in v1.2.3

type EntryTitle3 struct {
	MalId  int     `json:"mal_id"`
	Url    string  `json:"url"`
	Images Images3 `json:"images"`
	Title  string  `json:"title"`
}

EntryTitle3 struct

type GenreFilter added in v1.2.0

type GenreFilter string
const (
	GenresFilterGenres         GenreFilter = "genres"
	GenresFilterExplicitGenres GenreFilter = "explicit_genres"
	GenresFilterThemes         GenreFilter = "themes"
	GenresFilterDemographics   GenreFilter = "demographics"
)

type Genres added in v1.2.0

type Genres struct {
	Data []MalItemCount `json:"data"`
}

Genres struct

func GetAnimeGenres added in v1.2.0

func GetAnimeGenres(page, limit int, filter GenreFilter) (*Genres, error)

GetAnimeGenres returns anime genres

func GetMangaGenres added in v1.2.0

func GetMangaGenres(page, limit int, filter GenreFilter) (*Genres, error)

GetMangaGenres returns manga genres

type Images1 added in v1.2.3

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 added in v1.2.3

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 added in v1.2.3

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 added in v1.2.0

type Magazines struct {
	Data       []MalItemCount `json:"data"`
	Pagination Pagination     `json:"pagination"`
}

Magazines struct

func GetMagazines added in v1.2.0

func GetMagazines(page int) (*Magazines, error)

GetMagazines returns magazines

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 added in v1.2.3

type MalItemCount struct {
	MalId int    `json:"mal_id"`
	Name  string `json:"name"`
	Url   string `json:"url"`
	Count int    `json:"count"`
}

MalItemCount struct

type MangaBase added in v1.2.0

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 MangaById added in v1.2.0

type MangaById struct {
	Data MangaBase `json:"data"`
}

MangaById struct

func GetMangaById added in v1.2.0

func GetMangaById(id int) (*MangaById, error)

GetMangaById returns manga by id

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 added in v1.2.0

type MangaExternal struct {
	Data []struct {
		Name string `json:"name"`
		Url  string `json:"url"`
	} `json:"data"`
}

MangaExternal struct

func GetMangaExternal added in v1.2.0

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 added in v1.2.0

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

func GetMangaNews(id, page int) (*MangaNews, error)

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 added in v1.2.0

type MangaRelations struct {
	Data []struct {
		Relation string    `json:"relation"`
		Entry    []MalItem `json:"entry"`
	} `json:"data"`
}

MangaRelations struct

func GetMangaRelations added in v1.2.0

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 added in v1.2.0

type MangaSearch struct {
	Data       []MangaBase `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

MangaSearch struct

func GetMangaSearch added in v1.2.0

func GetMangaSearch(query url.Values) (*MangaSearch, error)

GetMangaSearch returns manga search

type MangaStatistics added in v1.2.0

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 added in v1.2.0

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 added in v1.2.3

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

Pagination struct

type PeopleBase added in v1.2.0

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 added in v1.2.0

type PeopleSearch struct {
	Data       []PeopleBase `json:"data"`
	Pagination Pagination   `json:"pagination"`
}

PeopleSearch struct

func GetPeopleSearch added in v1.2.0

func GetPeopleSearch(query url.Values) (*PeopleSearch, error)

GetPeopleSearch returns people search

type PersonAnime added in v1.2.0

type PersonAnime struct {
	Data []struct {
		Position string      `json:"position"`
		Anime    EntryTitle3 `json:"anime"`
	} `json:"data"`
}

PersonAnime struct

func GetPersonAnime added in v1.2.0

func GetPersonAnime(id int) (*PersonAnime, error)

GetPersonAnime returns person anime

type PersonById added in v1.2.0

type PersonById struct {
	Data PeopleBase `json:"data"`
}

PersonById struct

func GetPersonById added in v1.2.0

func GetPersonById(id int) (*PersonById, error)

GetPersonById returns person by id

type PersonManga added in v1.2.0

type PersonManga struct {
	Data []struct {
		Position string      `json:"position"`
		Manga    EntryTitle3 `json:"manga"`
	} `json:"data"`
}

PersonManga struct

func GetPersonManga added in v1.2.0

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 added in v1.2.0

type PersonVoices struct {
	Data []struct {
		Role      string      `json:"role"`
		Anime     EntryTitle3 `json:"anime"`
		Character EntryName2  `json:"character"`
	} `json:"data"`
}

PersonVoices struct

func GetPersonVoices added in v1.2.0

func GetPersonVoices(id int) (*PersonVoices, error)

GetPersonVoices returns person voices

type Producers added in v1.2.0

type Producers struct {
	Data       []MalItemCount `json:"data"`
	Pagination Pagination     `json:"pagination"`
}

Producers struct

func GetProducers added in v1.2.0

func GetProducers(page int) (*Producers, error)

GetProducers returns producers

type RandomAnime added in v1.2.0

type RandomAnime struct {
	Data AnimeBase `json:"data"`
}

RandomAnime struct

func GetRandomAnime added in v1.2.0

func GetRandomAnime() (*RandomAnime, error)

GetRandomAnime returns random anime

type RandomCharacters added in v1.2.0

type RandomCharacters struct {
	Data CharactersBase `json:"data"`
}

RandomCharacters struct

func GetRandomCharacters added in v1.2.0

func GetRandomCharacters() (*RandomCharacters, error)

GetRandomCharacters returns random characters

type RandomManga added in v1.2.0

type RandomManga struct {
	Data MangaBase `json:"data"`
}

RandomManga struct

func GetRandomManga added in v1.2.0

func GetRandomManga() (*RandomManga, error)

GetRandomManga returns random manga

type RandomPeople added in v1.2.0

type RandomPeople struct {
	Data PeopleBase `json:"data"`
}

RandomPeople struct

func GetRandomPeople added in v1.2.0

func GetRandomPeople() (*RandomPeople, error)

GetRandomPeople returns random people

type RandomUsers added in v1.2.0

type RandomUsers struct {
	Data UsersBase `json:"data"`
}

RandomUsers struct

func GetRandomUsers added in v1.2.0

func GetRandomUsers() (*RandomUsers, error)

GetRandomUsers returns random users

type RecentAnimeReviews added in v1.2.0

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 added in v1.2.0

func GetRecentAnimeReviews() (*RecentAnimeReviews, error)

GetRecentAnimeReviews returns recent anime reviews

type RecentMangaReviews added in v1.2.0

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 added in v1.2.0

func GetRecentMangaReviews() (*RecentMangaReviews, error)

GetRecentMangaReviews returns recent manga reviews

type RecentRecommendations added in v1.2.0

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 added in v1.2.0

func GetRecentAnimeRecommendations() (*RecentRecommendations, error)

GetRecentAnimeRecommendations returns recent anime recommendations

func GetRecentMangaRecommendations added in v1.2.0

func GetRecentMangaRecommendations() (*RecentRecommendations, error)

GetRecentMangaRecommendations returns recent manga recommendations

type ScheduleFilter added in v1.2.0

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 added in v1.2.0

type Schedules struct {
	Data       []AnimeBase `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

Schedules struct

func GetSchedules added in v1.2.0

func GetSchedules(filter ScheduleFilter) (*Schedules, error)

GetSchedules returns schedules

type ScoresAnime added in v1.2.3

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 added in v1.2.3

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 added in v1.2.3

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 added in v1.2.3

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 GetSeason

func GetSeason(year int, season string) (*Season, error)

GetSeason returns season

func GetSeasonNow added in v1.2.0

func GetSeasonNow() (*Season, error)

GetSeasonNow returns season now

func GetSeasonUpcoming added in v1.2.0

func GetSeasonUpcoming() (*Season, error)

GetSeasonUpcoming returns season upcoming

type SeasonsList added in v1.2.0

type SeasonsList struct {
	Data []struct {
		Year    int      `json:"year"`
		Seasons []string `json:"seasons"`
	} `json:"data"`
}

func GetSeasonsList added in v1.2.0

func GetSeasonsList() (*SeasonsList, error)

GetSeasonsList returns seasons list

type TopAnime added in v1.0.0

type TopAnime struct {
	Data       []AnimeBase `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

TopAnime struct

func GetTopAnime added in v1.0.0

func GetTopAnime(subType TopAnimeType, filter TopAnimeFilter, page int) (*TopAnime, error)

GetTopAnime returns top anime

type TopAnimeFilter added in v1.2.0

type TopAnimeFilter string
const (
	TopAnimeFilterAiring       TopAnimeFilter = "airing"
	TopAnimeFilterUpcoming     TopAnimeFilter = "upcoming"
	TopAnimeFilterByPopularity TopAnimeFilter = "bypopularity"
	TopAnimeFilterFavorite     TopAnimeFilter = "favorite"
)

type TopAnimeType added in v1.2.0

type TopAnimeType string
const (
	TopAnimeTypeTv      TopAnimeType = "tv"
	TopAnimeTypeMovie   TopAnimeType = "movie"
	TopAnimeTypeOva     TopAnimeType = "ova"
	TopAnimeTypeSpecial TopAnimeType = "special"
	TopAnimeTypeOna     TopAnimeType = "ona"
	TopAnimeTypeMusic   TopAnimeType = "music"
)

type TopCharacters added in v1.0.0

type TopCharacters struct {
	Data       []CharactersBase `json:"data"`
	Pagination Pagination       `json:"pagination"`
}

TopCharacters struct

func GetTopCharacters added in v1.0.0

func GetTopCharacters(page int) (*TopCharacters, error)

GetTopCharacters returns top characters

type TopManga added in v1.0.0

type TopManga struct {
	Data       []MangaBase `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

TopManga struct

func GetTopManga added in v1.0.0

func GetTopManga(subType TopMangaType, filter TopMangaFilter, page int) (*TopManga, error)

GetTopManga returns top manga

type TopMangaFilter added in v1.2.0

type TopMangaFilter string
const (
	TopMangaFilterPublishing   TopMangaFilter = "publishing"
	TopMangaFilterUpcoming     TopMangaFilter = "upcoming"
	TopMangaFilterByPopularity TopMangaFilter = "bypopularity"
	TopMangaFilterFavorite     TopMangaFilter = "favorite"
)

type TopMangaType added in v1.2.0

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 added in v1.0.0

type TopPeople struct {
	Data       []PeopleBase `json:"data"`
	Pagination Pagination   `json:"pagination"`
}

TopPeople struct

func GetTopPeople added in v1.0.0

func GetTopPeople(page int) (*TopPeople, error)

GetTopPeople returns top people

type TopReviews added in v1.2.0

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 added in v1.2.0

func GetTopReviews(page int) (*TopReviews, error)

GetTopReviews returns top reviews

type UserAbout added in v1.2.0

type UserAbout struct {
	Data struct {
		About string `json:"about"`
	} `json:"data"`
}

UserAbout struct

func GetUserAbout added in v1.2.0

func GetUserAbout(username string) (*UserAbout, error)

GetUserAbout returns user about

type UserAnimelist added in v1.2.0

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 added in v1.2.0

func GetUserAnimelist(username string) (*UserAnimelist, error)

GetUserAnimelist returns user animelist Deprecated: Anime lists will be discontinued from May 1st, 2022.

type UserByID added in v1.2.0

type UserByID struct {
	Data UsersBase `json:"data"`
}

UserByID struct

func GetUserByID added in v1.2.0

func GetUserByID(id int) (*UserByID, error)

GetUserByID returns user by id

type UserClubs added in v1.2.0

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 added in v1.2.0

func GetUserClubs(username string) (*UserClubs, error)

GetUserClubs returns user clubs

type UserFavorites added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

type UserHistoryFilter string
const (
	UserHistoryFilterAnime UserHistoryFilter = "anime"
	UserHistoryFilterManga UserHistoryFilter = "manga"
)

type UserItem added in v1.2.3

type UserItem struct {
	Username string  `json:"username"`
	Url      string  `json:"url"`
	Images   Images1 `json:"images"`
}

UserItem struct

type UserMangalist added in v1.2.0

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 added in v1.2.0

func GetUserMangalist(username string) (*UserMangalist, error)

GetUserMangalist returns user mangalist Deprecated: Manga lists will be discontinued from May 1st, 2022.

type UserProfile added in v1.2.0

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 added in v1.2.0

func GetUserProfile(username string) (*UserProfile, error)

GetUserProfile returns user profile

type UserRecommendations added in v1.2.0

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 added in v1.2.0

func GetUserRecommendations(username string) (*UserRecommendations, error)

GetUserRecommendations returns user recommendations

type UserReviews added in v1.2.0

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 added in v1.2.0

func GetUserReviews(username string) (*UserReviews, error)

GetUserReviews returns user reviews

type UserStatistics added in v1.2.0

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 added in v1.2.0

func GetUserStatistics(username string) (*UserStatistics, error)

GetUserStatistics returns user statistics

type UserUpdates added in v1.2.0

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 added in v1.2.0

func GetUserUpdates(username string) (*UserUpdates, error)

GetUserUpdates returns user updates

type UsersBase added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

func GetUsersSearch(query url.Values) (*UsersSearch, error)

GetUsersSearch returns users search

type WatchEpisodes added in v1.2.0

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 added in v1.2.0

func GetWatchPopularEpisodes() (*WatchEpisodes, error)

GetWatchPopularEpisodes returns watch popular episodes

func GetWatchRecentEpisodes added in v1.2.0

func GetWatchRecentEpisodes() (*WatchEpisodes, error)

GetWatchRecentEpisodes returns watch recent episodes

type WatchPromos added in v1.2.0

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 added in v1.2.0

func GetWatchPopularPromos() (*WatchPromos, error)

GetWatchPopularPromos returns watch popular promos

func GetWatchRecentPromos added in v1.2.0

func GetWatchRecentPromos() (*WatchPromos, error)

GetWatchRecentPromos returns watch recent promos

Jump to

Keyboard shortcuts

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