anidb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AniDB

type AniDB interface {
	GetTitles(ctx context.Context) (anime Animes, err error)
}

func New

func New() AniDB

type Anime

type Anime struct {
	ID     uint   `json:"id"`
	Titles Titles `json:"titles"`
}

type AnimeTitles

type AnimeTitles struct {
	XMLName xml.Name `xml:"animetitles"`
	Text    string   `xml:",chardata"`
	Anime   []struct {
		Text  string `xml:",chardata"`
		Aid   string `xml:"aid,attr"`
		Title []struct {
			Text string `xml:",chardata"`
			Lang string `xml:"lang,attr"`
			Type string `xml:"type,attr"`
		} `xml:"title"`
	} `xml:"anime"`
}

type Animes

type Animes []*Anime

func (Animes) Len

func (a Animes) Len() int

func (Animes) Less

func (a Animes) Less(i, j int) bool

func (Animes) Swap

func (a Animes) Swap(i, j int)

type Title

type Title struct {
	Language string `json:"language"`
	Name     string `json:"name"`
	Type     string `json:"type"`
}

type Titles

type Titles []*Title

func (Titles) Len

func (t Titles) Len() int

func (Titles) Less

func (t Titles) Less(i, j int) bool

func (Titles) Swap

func (t Titles) Swap(i, j int)

Jump to

Keyboard shortcuts

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