entity

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

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

Available anime relation.

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 *mal.Anime) (*Anime, error)

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 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.

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 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