anidb

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrTitleNotFound = common.Error("title not found")

	// DefaultMatchDistanceUpperBound is the number of characters that
	// can at most be edited in order to reach the target search term
	// this is the default value that is set if no edit distance is provided as parameter
	DefaultMatchDistanceUpperBound = 5
)
View Source
const (
	// These values are registered with the AniDB
	ClientName    = "animatch"
	ClientVersion = 100
)

Variables

View Source
var (
	DecodeTitles = anidb.DecodeTitles
)

Functions

This section is empty.

Types

type Anime

type Anime = anidb.Anime

func MetaData

func MetaData(aid int) (*Anime, error)

type AnimeT

type AnimeT = anidb.AnimeT
func Search(terms string, metric StringMetric) (*float64, *string, *AnimeT, error)

Search simply looks for the provided terms maxEditDistance is an optional single value that allows to provide an upper boundary which is exclusive. This boundary controls the search match accuracy.

type Client

type Client = anidb.Client

func NewClient

func NewClient() *Client

type SearchResult

type SearchResult []AnimeT

func (SearchResult) Titles

func (sr SearchResult) Titles() [][]string

type StringMetric

type StringMetric = strutil.StringMetric

type TitlesCache

type TitlesCache = anidb.TitlesCache

func DefaultTitlesCache

func DefaultTitlesCache() (*TitlesCache, error)

DefaultTitlesCache returns a singleton of the solely once parsed titles cache that are stored locally.

func NormalizedTitlesCache

func NormalizedTitlesCache() (*TitlesCache, error)

NormalizedTitlesCache returns a singleton where every title is normalized. This instance is used in order to speed up the search algorithms that redundantly normalize this cache's titles

Jump to

Keyboard shortcuts

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