Documentation ¶
Index ¶
- Constants
- func New(api service.API, c service.Cacher, l service.Logger) service.API
- type Validator
- func (v *Validator) GetAnime(id int) (*model.Anime, int, error)
- func (v *Validator) GetAnimeArticle(id int) ([]model.ArticleItem, int, error)
- func (v *Validator) GetAnimeCharacter(id int) ([]model.CharacterItem, int, error)
- func (v *Validator) GetAnimeClub(id int) ([]model.ClubItem, int, error)
- func (v *Validator) GetAnimeEpisode(id int, page int) ([]model.Episode, int, error)
- func (v *Validator) GetAnimeMoreInfo(id int) (string, int, error)
- func (v *Validator) GetAnimeNews(id int) ([]model.NewsItem, int, error)
- func (v *Validator) GetAnimePicture(id int) ([]string, int, error)
- func (v *Validator) GetAnimeRecommendation(id int) ([]model.Recommendation, int, error)
- func (v *Validator) GetAnimeReview(id int, page int) ([]model.Review, int, error)
- func (v *Validator) GetAnimeStaff(id int) ([]model.Role, int, error)
- func (v *Validator) GetAnimeStats(id int) (*model.Stats, int, error)
- func (v *Validator) GetAnimeVideo(id int, page int) (*model.Video, int, error)
- func (v *Validator) GetAnimeWithGenre(id int, page int) ([]model.AnimeItem, int, error)
- func (v *Validator) GetArticle(id int) (*model.Article, int, error)
- func (v *Validator) GetArticleTag() ([]model.ArticleTagItem, int, error)
- func (v *Validator) GetArticles(page int, tag string) ([]model.ArticleItem, int, error)
- func (v *Validator) GetCharacter(id int) (*model.Character, int, error)
- func (v *Validator) GetCharacterArticle(id int) ([]model.ArticleItem, int, error)
- func (v *Validator) GetCharacterClub(id int) ([]model.ClubItem, int, error)
- func (v *Validator) GetCharacterOgraphy(t string, id int) ([]model.Role, int, error)
- func (v *Validator) GetCharacterPicture(id int) ([]string, int, error)
- func (v *Validator) GetCharacterVA(id int) ([]model.Role, int, error)
- func (v *Validator) GetClub(id int) (*model.Club, int, error)
- func (v *Validator) GetClubMember(id int, page int) ([]model.ClubMember, int, error)
- func (v *Validator) GetClubPicture(id int) ([]string, int, error)
- func (v *Validator) GetClubRelated(id int) (*model.ClubRelated, int, error)
- func (v *Validator) GetClubs(page int) ([]model.ClubSearch, int, error)
- func (v *Validator) GetGenres(t string) ([]model.ItemCount, int, error)
- func (v *Validator) GetMagazine(id int, page int) ([]model.MangaItem, int, error)
- func (v *Validator) GetMagazines() ([]model.ItemCount, int, error)
- func (v *Validator) GetManga(id int) (*model.Manga, int, error)
- func (v *Validator) GetMangaArticle(id int) ([]model.ArticleItem, int, error)
- func (v *Validator) GetMangaCharacter(id int) ([]model.Role, int, error)
- func (v *Validator) GetMangaClub(id int) ([]model.ClubItem, int, error)
- func (v *Validator) GetMangaMoreInfo(id int) (string, int, error)
- func (v *Validator) GetMangaNews(id int) ([]model.NewsItem, int, error)
- func (v *Validator) GetMangaPicture(id int) ([]string, int, error)
- func (v *Validator) GetMangaRecommendation(id int) ([]model.Recommendation, int, error)
- func (v *Validator) GetMangaReview(id int, page int) ([]model.Review, int, error)
- func (v *Validator) GetMangaStats(id int) (*model.Stats, int, error)
- func (v *Validator) GetMangaWithGenre(id int, page int) ([]model.MangaItem, int, error)
- func (v *Validator) GetNews(id int) (*model.News, int, error)
- func (v *Validator) GetNewsList(page int, tag string) ([]model.NewsItem, int, error)
- func (v *Validator) GetNewsTag() (*model.NewsTag, int, error)
- func (v *Validator) GetPeople(id int) (*model.People, int, error)
- func (v *Validator) GetPeopleArticle(id int) ([]model.ArticleItem, int, error)
- func (v *Validator) GetPeopleCharacter(id int) ([]model.PeopleCharacter, int, error)
- func (v *Validator) GetPeopleManga(id int) ([]model.Role, int, error)
- func (v *Validator) GetPeopleNews(id int) ([]model.NewsItem, int, error)
- func (v *Validator) GetPeoplePicture(id int) ([]string, int, error)
- func (v *Validator) GetPeopleStaff(id int) ([]model.Role, int, error)
- func (v *Validator) GetProducer(id int, page int) ([]model.AnimeItem, int, error)
- func (v *Validator) GetProducers() ([]model.ItemCount, int, error)
- func (v *Validator) GetRecommendation(t string, id1, id2 int) (*model.Recommendation, int, error)
- func (v *Validator) GetRecommendations(t string, page int) ([]model.Recommendation, int, error)
- func (v *Validator) GetReview(id int) (*model.Review, int, error)
- func (v *Validator) GetReviews(t string, page int) ([]model.Review, int, error)
- func (v *Validator) GetSeason(season string, year int) ([]model.AnimeItem, int, error)
- func (v *Validator) GetTopAnime(t int, p int) ([]model.TopAnime, int, error)
- func (v *Validator) GetTopCharacter(page int) ([]model.TopCharacter, int, error)
- func (v *Validator) GetTopManga(t int, p int) ([]model.TopManga, int, error)
- func (v *Validator) GetTopPeople(page int) ([]model.TopPeople, int, error)
- func (v *Validator) GetUser(username string) (*model.User, int, error)
- func (v *Validator) GetUserAnime(query model.UserListQuery) ([]model.UserAnime, int, error)
- func (v *Validator) GetUserClub(username string) ([]model.Item, int, error)
- func (v *Validator) GetUserFavorite(username string) (*model.UserFavorite, int, error)
- func (v *Validator) GetUserFriend(username string, page int) ([]model.UserFriend, int, error)
- func (v *Validator) GetUserHistory(username string, t string) ([]model.UserHistory, int, error)
- func (v *Validator) GetUserManga(query model.UserListQuery) ([]model.UserManga, int, error)
- func (v *Validator) GetUserRecommendation(username string, page int) ([]model.Recommendation, int, error)
- func (v *Validator) GetUserReview(username string, page int) ([]model.Review, int, error)
- func (v *Validator) GetUserStats(username string) (*model.UserStats, int, error)
- func (v *Validator) SearchAnime(query model.Query) ([]model.AnimeSearch, int, error)
- func (v *Validator) SearchCharacter(name string, page int) ([]model.CharacterSearch, int, error)
- func (v *Validator) SearchClub(query model.ClubQuery) ([]model.ClubSearch, int, error)
- func (v *Validator) SearchManga(query model.Query) ([]model.MangaSearch, int, error)
- func (v *Validator) SearchPeople(name string, page int) ([]model.PeopleSearch, int, error)
- func (v *Validator) SearchUser(query model.UserQuery) ([]model.UserSearch, int, error)
Constants ¶
const ( AnimeType = "anime" MangaType = "manga" )
Main types.
const ( Winter = "winter" Spring = "spring" Summer = "summer" Fall = "fall" )
Season list.
const ( TopAiring = iota + 1 TopUpcoming TopTV TopMovie TopOVA TopONA TopSpecial TopPopularAnime TopFavoriteAnime )
Top anime types.
const ( TopManga = iota + 1 TopNovel TopOneshot TopDoujin TopManhwa TopManhua TopPopularManga TopFavoriteManga )
Top manga types.
const ( TypeTV = iota + 1 TypeOVA TypeMovie TypeSpecial TypeONA TypeMusic )
Anime types.
const ( TypeManga = iota + 1 TypeLightNovel TypeOneShot TypeDoujinshi TypeManhwa TypeManhua TypeNovel )
Manga types.
const ( StatusOnGoing = iota + 1 StatusFinished StatusUpcoming StatusHiatus // manga only StatusDiscontinued // manga only )
Anime & manga airing/publishing status.
const ( StatusDefault = iota StatusCurrent StatusCompleted StatusOnHold StatusDropped StatusPlanned StatusAll )
User list status.
const ( RatingDefault = iota RatingG // all ages RatingPG // children RatingPG13 // teens 13 or older RatingR17 // 17+ (violence & profanity) RatingR // mild nudity RatingRx // hentai )
Anime ratings.
const ( OrderAnimeTitle = iota + 1 OrderAnimeFinishDate OrderAnimeStartDate OrderAnimeScore OrderAnimeType OrderAnimeRated OrderAnimePriority OrderAnimeProgress OrderAnimeStorage OrderAnimeAirStart OrderAnimeAirEnd )
User anime list order.
const ( OrderMangaTitle = iota + 1 OrderMangaFinishDate OrderMangaStartDate OrderMangaScore OrderMangaPriority OrderMangaChapter OrderMangaVolume OrderMangaType OrderMangaPublishStart OrderMangaPublishEnd )
User manga list order.
const ( AnimeReview = "anime" MangaReview = "manga" BestReview = "bestvoted" )
Review types.
const ( GenderDefault = iota GenderMale GenderFemale GenderNonBinary )
Gender list.
const ( AllCategory = iota AnimeCategory ConventionCategory ActorCategory CharacterCategory CompanyCategory GameCategory JapanCategory CityCategory MusicCategory MangaCategory SchoolCategory OtherCategory )
Club categories.
const ( SortDefault = iota SortName SortComment SortPost SortMember )
Club sorts.
const OrderDefault = iota
OrderDefault is default user list order.
const TopDefault = iota
TopDefault is default top list.
const TypeDefault = iota
TypeDefault is default anime/manga type.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator will intercept and validate request data before processing the request.
func (*Validator) GetAnimeArticle ¶
GetAnimeArticle to get anime featured article list.
func (*Validator) GetAnimeCharacter ¶
GetAnimeCharacter to get anime character list.
func (*Validator) GetAnimeClub ¶
GetAnimeClub to get anime club list.
func (*Validator) GetAnimeEpisode ¶
GetAnimeEpisode to get anime episode list.
func (*Validator) GetAnimeMoreInfo ¶
GetAnimeMoreInfo to get anime more info.
func (*Validator) GetAnimeNews ¶
GetAnimeNews to get anime news list.
func (*Validator) GetAnimePicture ¶
GetAnimePicture to get anime picture list.
func (*Validator) GetAnimeRecommendation ¶
GetAnimeRecommendation to get anime recommendation list.
func (*Validator) GetAnimeReview ¶
GetAnimeReview to get anime review list.
func (*Validator) GetAnimeStaff ¶
GetAnimeStaff to get anime staff list.
func (*Validator) GetAnimeStats ¶
GetAnimeStats to get anime stats.
func (*Validator) GetAnimeVideo ¶
GetAnimeVideo to get anime video list.
func (*Validator) GetAnimeWithGenre ¶
GetAnimeWithGenre to get anime list with specific genre.
func (*Validator) GetArticle ¶
GetArticle to get featured article detail information.
func (*Validator) GetArticleTag ¶
func (v *Validator) GetArticleTag() ([]model.ArticleTagItem, int, error)
GetArticleTag to get featured article tag list.
func (*Validator) GetArticles ¶
GetArticles to get featured article list.
func (*Validator) GetCharacter ¶
GetCharacter to get character detail information.
func (*Validator) GetCharacterArticle ¶
GetCharacterArticle to get character featured article list.
func (*Validator) GetCharacterClub ¶
GetCharacterClub to get character club list.
func (*Validator) GetCharacterOgraphy ¶
GetCharacterOgraphy to get character animeography/mangaography list.
func (*Validator) GetCharacterPicture ¶
GetCharacterPicture to get character picture list.
func (*Validator) GetCharacterVA ¶ added in v1.2.0
GetCharacterVA to get character voice actor list.
func (*Validator) GetClubMember ¶
GetClubMember to get club member list.
func (*Validator) GetClubPicture ¶
GetClubPicture to get club picture list.
func (*Validator) GetClubRelated ¶
GetClubRelated to get club related list.
func (*Validator) GetMagazine ¶
GetMagazine to get magazine manga list.
func (*Validator) GetMagazines ¶
GetMagazines to get manga magazine/serialization list.
func (*Validator) GetMangaArticle ¶
GetMangaArticle to get manga featured article list.
func (*Validator) GetMangaCharacter ¶
GetMangaCharacter to get manga character list.
func (*Validator) GetMangaClub ¶
GetMangaClub to get manga club list.
func (*Validator) GetMangaMoreInfo ¶
GetMangaMoreInfo to get manga more info.
func (*Validator) GetMangaNews ¶
GetMangaNews to get manga news list.
func (*Validator) GetMangaPicture ¶
GetMangaPicture to get manga picture list.
func (*Validator) GetMangaRecommendation ¶
GetMangaRecommendation to get manga recommendation list.
func (*Validator) GetMangaReview ¶
GetMangaReview to get manga review list.
func (*Validator) GetMangaStats ¶
GetMangaStats to get manga stats list.
func (*Validator) GetMangaWithGenre ¶
GetMangaWithGenre to get manga list with specific genre.
func (*Validator) GetNewsList ¶
GetNewsList to get news list.
func (*Validator) GetNewsTag ¶
GetNewsTag to get news tag list.
func (*Validator) GetPeopleArticle ¶
GetPeopleArticle to get people featured article list.
func (*Validator) GetPeopleCharacter ¶
GetPeopleCharacter to get people anime character list.
func (*Validator) GetPeopleManga ¶
GetPeopleManga to get people published manga list.
func (*Validator) GetPeopleNews ¶
GetPeopleNews to get people news list.
func (*Validator) GetPeoplePicture ¶
GetPeoplePicture to get people picture list.
func (*Validator) GetPeopleStaff ¶
GetPeopleStaff to get people anime staff list.
func (*Validator) GetProducer ¶
GetProducer to get producer anime list.
func (*Validator) GetProducers ¶
GetProducers to get anime producer/studio/licensor list.
func (*Validator) GetRecommendation ¶
GetRecommendation to get recommendation detail information.
func (*Validator) GetRecommendations ¶
GetRecommendations to get anime/manga recommendation list.
func (*Validator) GetReviews ¶
GetReviews to get anime/manga/best review list.
func (*Validator) GetTopAnime ¶
GetTopAnime to get top anime list.
func (*Validator) GetTopCharacter ¶
GetTopCharacter to get top character list.
func (*Validator) GetTopManga ¶
GetTopManga to get top manga list.
func (*Validator) GetTopPeople ¶
GetTopPeople to get top people list.
func (*Validator) GetUserAnime ¶
GetUserAnime to get user anime list.
func (*Validator) GetUserClub ¶
GetUserClub to get user club list.
func (*Validator) GetUserFavorite ¶
GetUserFavorite to get user favorite list.
func (*Validator) GetUserFriend ¶
GetUserFriend to get user friend list.
func (*Validator) GetUserHistory ¶
GetUserHistory to get user history list.
func (*Validator) GetUserManga ¶
GetUserManga to get user manga list.
func (*Validator) GetUserRecommendation ¶
func (v *Validator) GetUserRecommendation(username string, page int) ([]model.Recommendation, int, error)
GetUserRecommendation to get user recommendation list.
func (*Validator) GetUserReview ¶
GetUserReview to get user review list.
func (*Validator) GetUserStats ¶
GetUserStats to get user stats detail information.
func (*Validator) SearchAnime ¶
SearchAnime to search anime with advanced query.
func (*Validator) SearchCharacter ¶
SearchCharacter to search character.
func (*Validator) SearchClub ¶
SearchClub to search club with advanced query.
func (*Validator) SearchManga ¶
SearchManga to search manga with advanced query.
func (*Validator) SearchPeople ¶
SearchPeople to search people.
func (*Validator) SearchUser ¶
SearchUser to search club with advanced query.