degrees

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPersonNotFound = errors.New("person not found")

Functions

func FindActor added in v0.2.0

func FindActor(ctx context.Context, c TMDBClient, query string) (tmdb.Person, error)

Types

type Link struct {
	Movie
	tmdb.Person
}

func (Link) String

func (l Link) String() string

type Movie

type Movie struct {
	ID   int
	Name string
}

type Path

type Path []Link

func (Path) String

func (p Path) String() string

type PathFinder added in v0.2.0

type PathFinder struct {
	TMDBClient TMDBClient
	From       tmdb.Person
	To         tmdb.Person
	IncludeTV  bool
	Logger     *slog.Logger
	// contains filtered or unexported fields
}

func (*PathFinder) Find added in v0.2.0

func (f *PathFinder) Find(ctx context.Context, ch chan Path, maxPathLength int)

type TMDBClient

type TMDBClient interface {
	GetPersonCredits(ctx context.Context, id int) (tmdb.PersonCredits, error)
	SearchPersonPage(ctx context.Context, query string, page int) ([]tmdb.Person, int, error)
	GetPerson(ctx context.Context, id int) (tmdb.Person, error)
	GetMovie(ctx context.Context, id int) (tmdb.Movie, error)
	GetMovieCredits(ctx context.Context, id int) (tmdb.MovieCredits, error)
	SearchPersonAllPages(ctx context.Context, query string) ([]tmdb.Person, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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