api

package
v0.0.0-...-4d56e88 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler holds the scraper instance and handles HTTP requests

func NewHandler

func NewHandler(s *scraper.Scraper) *Handler

NewHandler creates a new API handler

func (*Handler) APIRoot

func (h *Handler) APIRoot(w http.ResponseWriter, req *http.Request)

APIRoot handles requests to the API root path

func (*Handler) AZList

func (h *Handler) AZList(w http.ResponseWriter, req *http.Request)

AZList handles GET /api/azlist/{sortOption}

func (*Handler) AnimeDetails

func (h *Handler) AnimeDetails(w http.ResponseWriter, req *http.Request)

AnimeDetails handles GET /api/anime/{id}

func (*Handler) AnimeList

func (h *Handler) AnimeList(w http.ResponseWriter, req *http.Request)

AnimeList handles GET /api/animes/{category}

func (*Handler) AnimeQtipInfo

func (h *Handler) AnimeQtipInfo(w http.ResponseWriter, req *http.Request)

AnimeQtipInfo handles GET /api/qtip/{id}

func (*Handler) Episodes

func (h *Handler) Episodes(w http.ResponseWriter, req *http.Request)

Episodes handles GET /api/episodes/{id}

func (*Handler) EstimatedSchedule

func (h *Handler) EstimatedSchedule(w http.ResponseWriter, req *http.Request)

EstimatedSchedule handles GET /api/schedule

func (*Handler) GenreList

func (h *Handler) GenreList(w http.ResponseWriter, req *http.Request)

GenreList handles GET /api/genre/{genre}

func (*Handler) Health

func (h *Handler) Health(w http.ResponseWriter, req *http.Request)

Health handles GET /api/health

func (*Handler) Homepage

func (h *Handler) Homepage(w http.ResponseWriter, req *http.Request)

Homepage handles GET /api/home

func (*Handler) NextEpisodeSchedule

func (h *Handler) NextEpisodeSchedule(w http.ResponseWriter, req *http.Request)

NextEpisodeSchedule handles GET /api/next-episode/{id}

func (*Handler) Producer

func (h *Handler) Producer(w http.ResponseWriter, req *http.Request)

Producer handles GET /api/producer/{producer-name}

func (*Handler) Root

func (h *Handler) Root(w http.ResponseWriter, req *http.Request)

Root handles requests to the root path

func (*Handler) Search

func (h *Handler) Search(w http.ResponseWriter, req *http.Request)

Search handles GET /api/search

func (*Handler) Servers

func (h *Handler) Servers(w http.ResponseWriter, req *http.Request)

Servers handles GET /api/servers

func (*Handler) Stream

func (h *Handler) Stream(w http.ResponseWriter, req *http.Request)

Stream handles GET /api/stream

func (*Handler) Suggestions

func (h *Handler) Suggestions(w http.ResponseWriter, req *http.Request)

Suggestions handles GET /api/suggestion

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router handles HTTP routing for the API

func NewRouter

func NewRouter(handler *Handler, cfg *config.Config) *Router

NewRouter creates a new router instance

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler interface

func (*Router) Start

func (r *Router) Start() error

Start starts the HTTP server

Jump to

Keyboard shortcuts

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