watchlist

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatRequest added in v0.6.0

func FormatRequest(r *http.Request, statusCode int, latency time.Duration) []slog.Attr

func Unique added in v0.6.0

func Unique[V any, K cmp.Ordered](input []V, getKey func(V) K) []V

Types

type Entry

type Entry struct {
	Title  string `json:"title"`
	IMDBId string `json:"imdbId"`
}

Entry represents an entry in the IMDB watchlist

type Reader

type Reader interface {
	GetWatchlist(listID string) (entries imdb.Watchlist, err error)
}

type Server

type Server struct {
	http.Handler
	ListIDs []string
	// contains filtered or unexported fields
}

func New

func New(logger *slog.Logger, reader Reader, metrics metrics.RequestMetrics, listIDs ...string) *Server

func (*Server) Empty

func (s *Server) Empty(w http.ResponseWriter, _ *http.Request)

func (*Server) Movies added in v0.6.0

func (s *Server) Movies(w http.ResponseWriter, r *http.Request)

func (*Server) Series

func (s *Server) Series(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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