Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anime ¶
Anime type
type AnimeEx ¶
type AnimeEx struct {
ID uint16 `json:"id"`
Name string `json:"name"`
AltNames []string `json:"altNames,omitempty"`
Year uint16 `json:"year"`
Collections []CollectionEx `json:"collections,omitempty"`
}
AnimeEx export type
type Cache ¶
type Cache struct {
Anime []Anime
Themes []Theme
Collections []Collection
}
Cache type used to store cached anime titles
func (Cache) FilterAnime ¶
FilterAnime filters the Anime list
func (Cache) GetAnimeByID ¶
GetAnimeByID gets an Anime by ID
func (Cache) GetAnimeByMALID ¶
GetAnimeByMALID gets an Anime by MAL ID
func (Cache) GetAnimeThemes ¶
GetAnimeThemes gets all themes associated with an Anime
func (Cache) GetCollections ¶
func (c Cache) GetCollections(anime Anime) []Collection
GetCollections gets associated collections
type Collection ¶
Collection type, contains a slice of themes
func (Collection) FormatEx ¶
func (c Collection) FormatEx() CollectionEx
FormatEx formats the struct
type CollectionEx ¶
CollectionEx type
type Error ¶
Error type
func (Error) AnimeNotFound ¶
AnimeNotFound returns a proper error message for when a passed ID does not match any scrapped Anime title
func (Error) InvalidAccessToken ¶
InvalidAccessToken returns a proper error message for when the access token is incorrect
func (Error) LogNotFound ¶
LogNotFound returns a proper error message for when a passed ID does not match any log file
type Response ¶
type Response struct {
Status int `json:"status"`
HasError bool `json:"hasError"`
Error *Error `json:"error,omitempty"`
Data interface{} `json:"data,omitempty"`
}
Response type
type Source ¶
type Source struct {
Link string
Format string
Resolution string
HasLyrics bool
IsTransition bool
IsOver bool
Tags []string
}
Source type
type SourceEx ¶
type SourceEx struct {
Link string `json:"link"`
Format string `json:"format"`
Resolution string `json:"resolution"`
HasLyrics bool `json:"hasLyrics"`
IsTransition bool `json:"isTransition"`
IsOver bool `json:"isOver"`
Tags []string `json:"tags,omitempty"`
}
SourceEx export type
type Theme ¶
type Theme struct {
AnimeMALID uint16
CollectionID string
Name string
ThemeType uint8
Order uint8
Version uint8
Episodes []string
IsNSFW bool
HasSpoilers bool
Sources []Source
}
Theme song type
type ThemeEx ¶
type ThemeEx struct {
Name string `json:"name"`
ThemeType uint8 `json:"type"`
Order uint8 `json:"order"`
Variant uint8 `json:"version"`
Episodes []string `json:"episodes"`
IsNSFW bool `json:"isNSFW"`
HasSpoilers bool `json:"hasSpoilers"`
Sources []SourceEx `json:"sources,omitempty"`
}
ThemeEx export type