model

package
Version: v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Airing

type Airing struct {
	Start string `json:"start"`
	End   string `json:"end"`
	Day   string `json:"day"`
	Time  string `json:"time"`
}

Airing represents anime airing details.

type AlternativeTitle

type AlternativeTitle struct {
	English  string `json:"english"`
	Japanese string `json:"japanese"`
	Synonym  string `json:"synonym"`
}

AlternativeTitle represents anime & manga alternative titles.

type Anime

type Anime struct {
	ID                int              `json:"id"`
	Title             string           `json:"title"`
	AlternativeTitles AlternativeTitle `json:"alternativeTitles"`
	Cover             string           `json:"cover"`
	Video             string           `json:"video"`
	Synopsis          string           `json:"synopsis"`
	Score             float64          `json:"score"`
	Voter             int              `json:"voter"`
	Rank              int              `json:"rank"`
	Popularity        int              `json:"popularity"`
	Member            int              `json:"member"`
	Favorite          int              `json:"favorite"`
	Type              int              `json:"type"`
	Episode           int              `json:"episode"`
	Status            int              `json:"status"`
	Airing            Airing           `json:"airing"`
	Duration          string           `json:"duration"`
	Premiered         string           `json:"premiered"`
	Source            int              `json:"source"`
	Rating            int              `json:"rating"`
	Producers         []IDName         `json:"producers"`
	Licensors         []IDName         `json:"licensors"`
	Studios           []IDName         `json:"studios"`
	Genres            []IDName         `json:"genres"`
	Related           Related          `json:"related"`
	Songs             Song             `json:"songs"`
}

Anime represents anime model retrieved from db.

type AnimeCharacter added in v0.12.0

type AnimeCharacter struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Image       string `json:"image"`
	Role        string `json:"role"`
	VoiceActors []Role `json:"voiceActors"`
}

AnimeCharacter represents anime's characters and their voice actors.

type AnimeQuery added in v0.12.0

type AnimeQuery struct {
	// Basic search.
	Title  string
	Score  int
	Type   int
	Status int
	Rating int
	Source int
	Year   int
	Season string
	Limit  int
	Page   int
	Order  string

	// Advanced search.
	StartYear     int
	EndYear       int
	StartEpisode  int
	EndEpisode    int
	StartDuration int // Minutes.
	EndDuration   int // Minutes.
	Producer      int
	Genre         []int
}

AnimeQuery represents anime search query model.

type Character

type Character struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Nickname  string `json:"nickname"`
	KanjiName string `json:"kanjiName"`
	Image     string `json:"image"`
	Favorite  int    `json:"favorite"`
	About     string `json:"about"`
}

Character represents character model retrieved from db.

type DetailYearScore added in v0.12.0

type DetailYearScore struct {
	Year     int     `json:"year"`
	Count    int     `json:"count"`
	AvgScore float64 `json:"avgScore"`
	MinScore float64 `json:"minScore"`
	MaxScore float64 `json:"maxScore"`
}

DetailYearScore represents detail score summary.

type IDName

type IDName struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

IDName represents common model contains ID and name.

type MainTotal added in v0.12.0

type MainTotal struct {
	Anime     int `json:"anime"`
	Manga     int `json:"manga"`
	Character int `json:"character"`
	People    int `json:"people"`
}

MainTotal represents total main type count model.

type Manga

type Manga struct {
	ID                int              `json:"id"`
	Title             string           `json:"title"`
	AlternativeTitles AlternativeTitle `json:"alternativeTitles"`
	Cover             string           `json:"cover"`
	Synopsis          string           `json:"synopsis"`
	Score             float64          `json:"score"`
	Voter             int              `json:"voter"`
	Rank              int              `json:"rank"`
	Popularity        int              `json:"popularity"`
	Member            int              `json:"member"`
	Favorite          int              `json:"favorite"`
	Type              int              `json:"type"`
	Volume            int              `json:"volume"`
	Chapter           int              `json:"chapter"`
	Status            int              `json:"status"`
	Publishing        Publishing       `json:"publishing"`
	Genres            []IDName         `json:"genres"`
	Authors           []Role           `json:"authors"`
	Serializations    []IDName         `json:"serializations"`
	Related           Related          `json:"related"`
}

Manga represents manga model retrieved from db.

type MangaQuery added in v0.12.0

type MangaQuery struct {
	// Basic search.
	Title  string
	Score  int
	Type   int
	Status int
	Year   int
	Limit  int
	Page   int
	Order  string

	// Advanced search.
	StartYear    int
	EndYear      int
	StartVolume  int
	EndVolume    int
	StartChapter int
	EndChapter   int
	Magazine     int
	Genre        []int
}

MangaQuery represents manga search query model.

type Media

type Media struct {
	ID         int     `json:"id"`
	Title      string  `json:"title"`
	Cover      string  `json:"cover"`
	Score      float64 `json:"score"`
	Voter      int     `json:"voter"`
	Rank       int     `json:"rank"`
	Popularity int     `json:"popularity"`
	Member     int     `json:"member"`
	Favorite   int     `json:"favorite"`
	Type       int     `json:"type"`
	Status     int     `json:"status"`
}

Media represents simple anime/manga model.

type People

type People struct {
	ID               int      `json:"id"`
	Name             string   `json:"name"`
	Image            string   `json:"image"`
	GivenName        string   `json:"givenName"`
	FamilyName       string   `json:"familyName"`
	AlternativeNames []string `json:"alternativeNames"`
	Birthday         string   `json:"birthday"`
	Website          string   `json:"website"`
	Favorite         int      `json:"favorite"`
	More             string   `json:"more"`
}

People represents people model retrieved from db.

type Publishing

type Publishing struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

Publishing represents manga publishing dates.

type Related struct {
	Sequel      []SimpleEntry `json:"sequel"`
	Prequel     []SimpleEntry `json:"prequel"`
	AltSetting  []SimpleEntry `json:"alternativeSetting"`
	AltVersion  []SimpleEntry `json:"alternativeVersion"`
	SideStory   []SimpleEntry `json:"sideStory"`
	Summary     []SimpleEntry `json:"summary"`
	FullStory   []SimpleEntry `json:"fullStory"`
	ParentStory []SimpleEntry `json:"parentStory"`
	SpinOff     []SimpleEntry `json:"spinOff"`
	Adaptation  []SimpleEntry `json:"adaptation"`
	Character   []SimpleEntry `json:"character"`
	Other       []SimpleEntry `json:"other"`
}

Related represents related anime & manga list.

type Role

type Role struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Image string `json:"image"`
	Role  string `json:"role"`
}

Role represents common model of character/people role.

type Score

type Score struct {
	Score1  ScoreDetail `json:"1"`
	Score2  ScoreDetail `json:"2"`
	Score3  ScoreDetail `json:"3"`
	Score4  ScoreDetail `json:"4"`
	Score5  ScoreDetail `json:"5"`
	Score6  ScoreDetail `json:"6"`
	Score7  ScoreDetail `json:"7"`
	Score8  ScoreDetail `json:"8"`
	Score9  ScoreDetail `json:"9"`
	Score10 ScoreDetail `json:"10"`
}

Score represents anime & manga stats for each score.

type ScoreDetail added in v0.12.0

type ScoreDetail struct {
	Vote    int     `json:"vote"`
	Percent float64 `json:"percent"`
}

ScoreDetail represents anime & manga each score count.

type Season added in v0.12.0

type Season struct {
	ID         int     `json:"id"`
	Title      string  `json:"title"`
	Cover      string  `json:"cover"`
	Synopsis   string  `json:"synopsis"`
	Score      float64 `json:"score"`
	Voter      int     `json:"voter"`
	Rank       int     `json:"rank"`
	Popularity int     `json:"popularity"`
	Member     int     `json:"member"`
	Favorite   int     `json:"favorite"`
	Type       int     `json:"type"`
	Episode    int     `json:"episode"`
	Status     int     `json:"status"`
	Airing     Airing  `json:"airing"`
	Source     int     `json:"source"`
	Rating     int     `json:"rating"`
}

Season represents anime seasonal model.

type SimpleEntry added in v0.12.0

type SimpleEntry struct {
	ID    int    `json:"id"`
	Type  string `json:"type"`
	Name  string `json:"name"`
	Image string `json:"image"`
}

SimpleEntry represents simple entry model.

type Song

type Song struct {
	Opening []string `json:"opening"`
	Ending  []string `json:"ending"`
}

Song represents anime opening and ending songs.

type Stats

type Stats struct {
	Summary Summary `json:"summary"`
	Score   Score   `json:"score"`
}

Stats represents anime & manga stats data.

type Summary added in v0.12.0

type Summary struct {
	Current   int `json:"current"`
	Completed int `json:"completed"`
	OnHold    int `json:"onHold"`
	Dropped   int `json:"dropped"`
	Planned   int `json:"planned"`
}

Summary represents anime & manga status count.

type User added in v0.17.0

type User struct {
	Username string `json:"username"`
	Image    string `json:"image"`
}

User represents user's data.

type UserAnimeProgress added in v0.17.0

type UserAnimeProgress struct {
	Ep1      UserScore `json:"1"`
	Ep2x6    UserScore `json:"2-6"`
	Ep7x13   UserScore `json:"7-13"`
	Ep14x26  UserScore `json:"14-26"`
	Ep27x52  UserScore `json:"27-52"`
	Ep53x100 UserScore `json:"53-100"`
	Ep101    UserScore `json:"101+"`
}

UserAnimeProgress represents user's anime episode range.

type UserEntry added in v0.17.0

type UserEntry struct {
	ID             int     `json:"id"`
	Title          string  `json:"title"`
	Cover          string  `json:"cover"`
	UserScore      int     `json:"userScore"`
	GlobalScore    float64 `json:"globalScore"`
	Type           int     `json:"type"`
	UserProgress   int     `json:"userProgress"`
	GlobalProgress int     `json:"globalProgress"`
	Status         int     `json:"status"`
}

UserEntry represents user's anime or manga list retrieved from db.

type UserGenre added in v0.17.0

type UserGenre struct {
	ID    int     `json:"id"`
	Genre string  `json:"genre"`
	Count int     `json:"count"`
	Score float64 `json:"score"`
}

UserGenre represents user's anime or manga genre count and score.

type UserMangaProgress added in v0.17.0

type UserMangaProgress struct {
	Ch1       UserScore `json:"1"`
	Ch2x10    UserScore `json:"2-10"`
	Ch11x25   UserScore `json:"11-25"`
	Ch26x50   UserScore `json:"26-50"`
	Ch51x100  UserScore `json:"51-100"`
	Ch101x200 UserScore `json:"101-200"`
	Ch201     UserScore `json:"201+"`
}

UserMangaProgress represents user's manga chapter range.

type UserProgress added in v0.17.0

type UserProgress struct {
	Anime UserAnimeProgress `json:"anime"`
	Manga UserMangaProgress `json:"manga"`
}

UserProgress represents user's anime/manga episode/chapter count and score.

type UserScore added in v0.17.0

type UserScore struct {
	Score float64 `json:"score"`
	Count int     `json:"count"`
}

UserScore represents user's anime or manga score count.

type UserStats added in v0.17.0

type UserStats struct {
	Current   int     `json:"current"`
	Completed int     `json:"completed"`
	OnHold    int     `json:"onHold"`
	Dropped   int     `json:"dropped"`
	Planned   int     `json:"planned"`
	Total     int     `json:"total"`
	Progress  int     `json:"progress"`
	Score     float64 `json:"score"`
}

UserStats represents user's anime or manga stats.

type UserStudioAuthor added in v0.17.0

type UserStudioAuthor struct {
	ID    int     `json:"id"`
	Name  string  `json:"name"`
	Count int     `json:"count"`
	Score float64 `json:"score"`
}

UserStudioAuthor represents user's anime studio and manga author count and score.

type UserType added in v0.17.0

type UserType struct {
	Type  int     `json:"type"`
	Count int     `json:"count"`
	Score float64 `json:"score"`
}

UserType represnts user's anime or manga format type count and score.

type UserYear added in v0.17.0

type UserYear struct {
	Year  int     `json:"year"`
	Count int     `json:"count"`
	Score float64 `json:"score"`
}

UserYear represents user's anime/manga year count and score.

type VoiceActor

type VoiceActor struct {
	Anime     Role `json:"anime"`
	Character Role `json:"character"`
}

VoiceActor represents voice actor model with their anime and character role.

type YearlyScore added in v0.12.0

type YearlyScore struct {
	Anime DetailYearScore `json:"anime"`
	Manga DetailYearScore `json:"manga"`
}

YearlyScore represents anime & manga score summary.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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