entity

package
v0.11.11 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlternativeTitle

type AlternativeTitle struct {
	Synonyms []string
	English  string
	Japanese string
}

AlternativeTitle is entity for alternative title.

type Anime

type Anime struct {
	ID               int64
	Title            string
	AlternativeTitle AlternativeTitle
	Picture          string
	StartDate        Date
	EndDate          Date
	Synopsis         string
	NSFW             bool
	Type             Type
	Status           Status
	Episode          Episode
	Season           SeasonYear
	Broadcast        Broadcast
	Source           Source
	Rating           Rating
	Background       string
	Mean             float64
	Rank             int
	Popularity       int
	Member           int
	Voter            int
	Stats            Stats

	// Relation.
	GenreIDs  []int64
	Pictures  []string
	Related   []Related
	StudioIDs []int64

	UpdatedAt time.Time
}

Anime is entity for anime.

func AnimeFromMal

func AnimeFromMal(ctx context.Context, anime *nagato.Anime) Anime

AnimeFromMal to convert mal to anime.

type AnimeRelated added in v0.3.0

type AnimeRelated struct {
	AnimeID1 int64
	AnimeID2 int64
	Relation Relation
}

AnimeRelated is entity for related anime.

type Broadcast

type Broadcast struct {
	Day  Day
	Time string
}

Broadcast is entity for broadcast.

type Date

type Date struct {
	Day   int
	Month int
	Year  int
}

Date is entity for date.

type Day

type Day string

Day is broadcast day.

const (
	DayMonday    Day = "MONDAY"
	DayTuesday   Day = "TUESDAY"
	DayWednesday Day = "WEDNESDAY"
	DayThursday  Day = "THURSDAY"
	DayFriday    Day = "FRIDAY"
	DaySaturday  Day = "SATURDAY"
	DaySunday    Day = "SUNDAY"
	DayOther     Day = "OTHER"
)

Available broadcast day.

type Episode

type Episode struct {
	Count    int
	Duration int
}

Episode is entity for episode.

type GetHistoriesRequest added in v0.9.0

type GetHistoriesRequest struct {
	AnimeID   int64
	StartDate *time.Time
	EndDate   *time.Time
	Group     HistoryGroup
}

GetHistoriesRequest is get histories request model.

type GetRequest added in v0.9.0

type GetRequest struct {
	Title           string
	NSFW            *bool
	Type            Type
	Status          Status
	Season          Season
	SeasonYear      int
	StartMean       float64
	EndMean         float64
	StartAiringYear int
	EndAiringYear   int
	GenreID         int64
	StudioID        int64
	Sort            Sort
	Page            int
	Limit           int
}

GetRequest is get request model.

type History added in v0.9.0

type History struct {
	Year          int
	Month         int
	Week          int
	Mean          float64
	Rank          int
	Popularity    int
	Member        int
	Voter         int
	UserWatching  int
	UserCompleted int
	UserOnHold    int
	UserDropped   int
	UserPlanned   int
}

History is entity for anime history.

type HistoryGroup added in v0.9.0

type HistoryGroup string

HistoryGroup is anime history group.

const (
	Yearly  HistoryGroup = "YEARLY"
	Monthly HistoryGroup = "MONTHLY"
	Weekly  HistoryGroup = "WEEKLY"
)

Available anime history group.

type Rating

type Rating string

Rating is anime rating.

const (
	RatingG     Rating = "G"
	RatingPG    Rating = "PG"
	RatingPG13  Rating = "PG_13"
	RatingR     Rating = "R"
	RatingRPlus Rating = "R+"
	RatingRX    Rating = "RX"
)

Available anime rating.

type Related struct {
	ID       int64
	Relation Relation
}

Related is entity for related anime.

type Relation

type Relation string

Relation is anime relation type.

const (
	RelationSequel             Relation = "SEQUEL"
	RelationPrequel            Relation = "PREQUEL"
	RelationAlternativeSetting Relation = "ALTERNATIVE_SETTING"
	RelationAlternativeVersion Relation = "ALTERNATIVE_VERSION"
	RelationSideStory          Relation = "SIDE_STORY"
	RelationParentStory        Relation = "PARENT_STORY"
	RelationSummary            Relation = "SUMMARY"
	RelationFullStory          Relation = "FULL_STORY"
	RelationSpinOff            Relation = "SPIN_OFF"
	RelationAdaptation         Relation = "ADAPTATION"
	RelationCharacter          Relation = "CHARACTER"
	RelationOther              Relation = "OTHER"
)

Available anime relation.

type Season

type Season string

Season is anime season.

const (
	SeasonWinter Season = "WINTER"
	SeasonSpring Season = "SPRING"
	SeasonSummer Season = "SUMMER"
	SeasonFall   Season = "FALL"
)

Available anime seasons.

type SeasonYear

type SeasonYear struct {
	Season Season
	Year   int
}

SeasonYear is entity for season and year.

type Sort added in v0.9.0

type Sort string

Sort is anime sorting.

const (
	SortID         Sort = "ID"
	SortTitle      Sort = "TITLE"
	SortStartDate  Sort = "START_DATE"
	SortMean       Sort = "MEAN"
	SortRank       Sort = "RANK"
	SortPopularity Sort = "POPULARITY"
	SortMember     Sort = "MEMBER"
	SortVoter      Sort = "VOTER"
)

Available anime sorting.

type Source

type Source string

Source is anime source.

const (
	SourceOriginal     Source = "ORIGINAL"
	SourceManga        Source = "MANGA"
	Source4Koma        Source = "4_KOMA_MANGA"
	SourceWebManga     Source = "WEB_MANGA"
	SourceDigitalManga Source = "DIGITAL_MANGA"
	SourceNovel        Source = "NOVEL"
	SourceLightNovel   Source = "LIGHT_NOVEL"
	SourceVisualNovel  Source = "VISUAL_NOVEL"
	SourceGame         Source = "GAME"
	SourceCardGame     Source = "CARD_GAME"
	SourceBook         Source = "BOOK"
	SourcePictureBook  Source = "PICTURE_BOOK"
	SourceRadio        Source = "RADIO"
	SourceMusic        Source = "MUSIC"
	SourceOther        Source = "OTHER"
	SourceWebNovel     Source = "WEB_NOVEL"   // undocumented
	SourceMixedMedia   Source = "MIXED_MEDIA" // undocumented
)

Available anime source.

type Stats

type Stats struct {
	Status StatsStatus
}

Stats is entity for stats. Will contain score in the future?

type StatsStatus

type StatsStatus struct {
	Watching  int
	Completed int
	OnHold    int
	Dropped   int
	Planned   int
}

StatsStatus is entity for stats status.

type Status

type Status string

Status is anime airing status.

const (
	StatusFinished  Status = "FINISHED"
	StatusReleasing Status = "RELEASING"
	StatusNotYet    Status = "NOT_YET"
)

Available anime airing status.

type Type

type Type string

Type is anime type.

const (
	TypeTV      Type = "TV"
	TypeOVA     Type = "OVA"
	TypeONA     Type = "ONA"
	TypeMovie   Type = "MOVIE"
	TypeSpecial Type = "SPECIAL"
	TypeMusic   Type = "MUSIC"
	TypeUnknown Type = ""
)

Available anime types.

Jump to

Keyboard shortcuts

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