anidbapi

package
v0.0.0-...-ed12b99 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnimeDetailsCheck

func AnimeDetailsCheck(aid string, runningConfig *env.Config)

AnimeDetailsCheck checks to see if the xml file for each AID from AniDB has been downloaded in the last 24 hours. AnimeTitlesCheck will download the xml if the file is older than 24 hours or has not been downloaded.

func AnimeDetailsGet

func AnimeDetailsGet(aid string, runningconfig *env.Config)

AnimeTitlesGet downloades the anime-titles.xml file from AniDB.

func AnimeTitleCompare

func AnimeTitleCompare(animetitle AnimeTitle, animename string, animelang string) bool

func AnimeTitlesCheck

func AnimeTitlesCheck(RunningConfig *env.Config)

AnimeTitlesCheck checks to see if the anime-titles.xml file from AniDB has been downloaded in the last 24 hours. AnimeTitlesCheck will download anime-titles.xml if the file is older than 24 hours or has not been downloaded.

func AnimeTitlesGet

func AnimeTitlesGet(savelocation string)

AnimeTitlesGet downloades the anime-titles.xml file from AniDB.

Types

type Anime

type Anime struct {
	Aid   int          `xml:"aid,attr"` //from anime-titles.xml
	Title []AnimeTitle `xml:"title"`    //from anime-titles.xml
}

Anime is the struct for the anime level of anime-titles.xml

type AnimeDetails

type AnimeDetails struct {
	Aid          int      `xml:"id,attr"`
	Episodes     Episodes `xml:"episodes"`
	EpisodeCount int      `xml:"episodecount"`
	StartDate    string   `xml:"startdate"`
	EndDate      string   `xml:"enddate"`
	Description  string   `xml:"description"`
}

func AnimeDetailsParse

func AnimeDetailsParse(xmlFilestring string) AnimeDetails

AnimeParse takes anime-titles.xml and produces an AnimeTitles struct with all revelent information

type AnimeTitle

type AnimeTitle struct {
	Name      string `xml:",chardata"` //from anime-titles.xml
	AnimeType string `xml:"type,attr"` //from anime-titles.xml
	Lang      string `xml:"lang,attr"` //from anime-titles.xml
}

AnimeTitle is the struct for the title lines of anime-titles.xml

type AnimeTitleSearchResults

type AnimeTitleSearchResults struct {
	Name    string
	Aid     string
	EpName  string
	Epno    string
	Airdate string
	Status  string
	Lang    string
	Quality string
}

AnimeTitleSearchResults is the struct for Anime title search results.

func AnimeSearch

func AnimeSearch(animeTitlesStruct AnimeTitles, animename string, animelang string) []AnimeTitleSearchResults

AnimeSearch will seach an AnimeTitles struct for an anime name and language. It will return the aid number(s) and anime name(s) from the AnimeTitles struct.

func AnimeSearchWrapper

func AnimeSearchWrapper(RunningConfig *env.Config, animename string, animelang string) []AnimeTitleSearchResults

type AnimeTitles

type AnimeTitles struct {
	AnimeList []Anime `xml:"anime"` //from anime-titles.xml
}

AnimeTitles is the struct for the top level of anime-titles.xml

func AnimeParse

func AnimeParse(xmlFilestring string) AnimeTitles

AnimeParse takes anime-titles.xml and produces an AnimeTitles struct with all revelent information

type Episode

type Episode struct {
	Epno    string       `xml:"epno"`
	Airdate string       `xml:"airdate"`
	Title   []AnimeTitle `xml:"title"`
	Status  string
}

type Episodes

type Episodes struct {
	Episode []Episode `xml:"episode"`
}

Jump to

Keyboard shortcuts

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