model

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 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 Date   `json:"start"`
	End   Date   `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"`
	Image             string           `json:"image"`
	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         []Item           `json:"producers"`
	Licensors         []Item           `json:"licensors"`
	Studios           []Item           `json:"studios"`
	Genres            []Item           `json:"genres"`
	Related           Related          `json:"related"`
	Songs             Song             `json:"songs"`
}

Anime represents anime model retrieved from db.

type AnimeCharacter

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

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"`
	Nicknames    []string `json:"nicknames"`
	JapaneseName string   `json:"japaneseName"`
	Image        string   `json:"image"`
	Favorite     int      `json:"favorite"`
	About        string   `json:"about"`
}

Character represents character model retrieved from db.

type CompareQuery added in v0.3.0

type CompareQuery struct {
	Title string
	Order string
	Page  int
	Limit int
}

CompareQuery represents score comparison query.

type Date

type Date struct {
	Year  int `json:"year"`
	Month int `json:"month"`
	Day   int `json:"day"`
}

Date represents splitted date.

Normal date usually has day, month, and year. But, in MyAnimeList, there are some dates that don't have them all 3. For example, (future) anime airing date which sometimes contains only year. So, it can't be parsed to time.Time. That's why this date has its own data type.

type Entry

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

Entry represents simple entry model.

type EntryQuery

type EntryQuery struct {
	Name  string
	Limit int
	Page  int
	Order string
}

EntryQuery represents character/people search query model.

type EntryScore added in v0.3.0

type EntryScore struct {
	ID    int     `json:"id"`
	Title string  `json:"title"`
	Type  string  `json:"type"`
	Score float64 `json:"score"`
}

EntryScore represents simple entry score.

type Item

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

Item represents common struct containing id and name.

type ItemCount

type ItemCount struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Count int    `json:"count"`
}

ItemCount represents common struct containing id, name and count.

type Manga

type Manga struct {
	ID                int              `json:"id"`
	Title             string           `json:"title"`
	AlternativeTitles AlternativeTitle `json:"alternativeTitles"`
	Image             string           `json:"image"`
	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            []Item           `json:"genres"`
	Authors           []Role           `json:"authors"`
	Serializations    []Item           `json:"serializations"`
	Related           Related          `json:"related"`
}

Manga represents manga model retrieved from db.

type MangaQuery

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"`
	Image      string  `json:"image"`
	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         Date     `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 Date `json:"start"`
	End   Date `json:"end"`
}

Publishing represents manga publishing dates.

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

Related represents related anime & manga model.

type Role

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

Role represents simple model of character/va's 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 ScoreComparison added in v0.3.0

type ScoreComparison struct {
	Novel []EntryScore `json:"novel"`
	Anime []EntryScore `json:"anime"`
	Manga []EntryScore `json:"manga"`
}

ScoreComparison represents entry score comparison.

type ScoreDetail

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

ScoreDetail represents anime & manga each score count.

type Song

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

Song represents anime opening and ending songs.

type Source

type Source struct {
	ID    int    `json:"id"`
	Title string `json:"title"`
	Image string `json:"image"`
	Type  string `json:"type"`
}

Source represents simple anime/manga model.

type Stats

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

Stats represents anime & manga stats data.

type StatsHistory added in v0.2.0

type StatsHistory struct {
	Year       int     `json:"year"`
	Month      int     `json:"month"`
	Score      float64 `json:"score"`
	Voter      int     `json:"voter"`
	Rank       int     `json:"rank"`
	Popularity int     `json:"popularity"`
	Member     int     `json:"member"`
	Favorite   int     `json:"favorite"`
}

StatsHistory represents entry stats history.

type Summary

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 Total

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

Total represents total main type count model.

type VoiceActor

type VoiceActor struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Image string `json:"image"`
	Role  string `json:"role"`
	Anime []Role `json:"anime"`
}

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

type YearSummary

type YearSummary struct {
	Anime YearSummaryDetail `json:"anime"`
	Manga YearSummaryDetail `json:"manga"`
}

YearSummary represents anime & manga score summary.

type YearSummaryDetail

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

YearSummaryDetail represents detail score summary.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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