Documentation
¶
Index ¶
- func SearchTypeListKey(kind string) string
- type EntityEndpoint
- func (e *EntityEndpoint) AllEntityMovies(kind, entityID string, opt EntityMoviesOptions, maxPages int) ([]map[string]any, error)
- func (e *EntityEndpoint) EntityDetail(kind, id string) (map[string]any, error)
- func (e *EntityEndpoint) EntityMovies(kind, entityID string, opt EntityMoviesOptions) (model.SearchResult, error)
- func (e *EntityEndpoint) ResolveEntity(kind, ref, zone string) (string, error)
- type EntityMoviesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SearchTypeListKey ¶
SearchTypeListKey maps entity kind to search response list key.
Types ¶
type EntityEndpoint ¶
type EntityEndpoint struct {
// contains filtered or unexported fields
}
EntityEndpoint 提供实体作品、详情、解析 capability。
func NewEntity ¶
func NewEntity(c *client.Client, browse *browse.BrowseEndpoint, search *search.SearchEndpoint) *EntityEndpoint
NewEntity 用共享 transport 与 browse/search capability 构造 entity capability。
func (*EntityEndpoint) AllEntityMovies ¶
func (e *EntityEndpoint) AllEntityMovies(kind, entityID string, opt EntityMoviesOptions, maxPages int) ([]map[string]any, error)
AllEntityMovies pages until empty (cap maxPages).
func (*EntityEndpoint) EntityDetail ¶
func (e *EntityEndpoint) EntityDetail(kind, id string) (map[string]any, error)
EntityDetail fetches GET /api/v1/{kind}s/{id} (or lists/{id} for list).
func (*EntityEndpoint) EntityMovies ¶
func (e *EntityEndpoint) EntityMovies(kind, entityID string, opt EntityMoviesOptions) (model.SearchResult, error)
EntityMovies lists movies for an entity via GET /api/v1/movies/tags.
func (*EntityEndpoint) ResolveEntity ¶
func (e *EntityEndpoint) ResolveEntity(kind, ref, zone string) (string, error)
ResolveEntity resolves id or name to entity id.
type EntityMoviesOptions ¶
type EntityMoviesOptions = model.EntityMoviesOptions
EntityMoviesOptions 是 model.EntityMoviesOptions 的 endpoint alias。
Click to show internal directories.
Click to hide internal directories.