fanart

package
v0.0.0-...-3f23c4f Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransformMedia

func TransformMedia(res FanartTvResponse) *domain.AnimeMedia

Types

type FanartTvResponse

type FanartTvResponse struct {
	Name      string `json:"name"`
	ThetvdbID string `json:"thetvdb_id"`
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"hdtvlogo,omitempty"`
	ShowBackground []struct {
		ID     string `json:"id"`
		URL    string `json:"url"`
		Lang   string `json:"lang"`
		Likes  string `json:"likes"`
		Season string `json:"season"`
	} `json:"showbackground,omitempty"`
	TVThumb []struct {
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"tvthumb,omitempty"`
	Tvposter []struct {
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"tvposter,omitempty"`
	HDClearArt []struct {
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"hdclearart,omitempty"`
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"clearlogo,omitempty"`
	ClearArt []struct {
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"clearart,omitempty"`
	SeasonBanner []struct {
		ID     string `json:"id"`
		URL    string `json:"url"`
		Lang   string `json:"lang"`
		Likes  string `json:"likes"`
		Season string `json:"season"`
	} `json:"seasonbanner,omitempty"`
	SeasonPoster []struct {
		ID     string `json:"id"`
		URL    string `json:"url"`
		Lang   string `json:"lang"`
		Likes  string `json:"likes"`
		Season string `json:"season"`
	} `json:"seasonposter,omitempty"`
	SeasonThumbnail []struct {
		ID     string `json:"id"`
		URL    string `json:"url"`
		Lang   string `json:"lang"`
		Likes  string `json:"likes"`
		Season string `json:"season"`
	} `json:"seasonthumb,omitempty"`
	TVBanner []struct {
		ID    string `json:"id"`
		URL   string `json:"url"`
		Lang  string `json:"lang"`
		Likes string `json:"likes"`
	} `json:"tvbanner,omitempty"`
}

type Service

type Service interface {
	GetMedia(ctx context.Context, ids ...string) ([]*domain.AnimeMedia, error)
}

func NewService

func NewService(
	cacher cacher.Cacher,
	redisTTL configmodels.RedisKeyTTL,
	provider configmodels.ProviderConfig,
) Service

Jump to

Keyboard shortcuts

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