Interface: CourmapClient
The client contract from docs/SPEC.md. Offline (SQLite), remote (static shards) and any other Dataset give identical answers, because every operation runs the same core code over it.
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Releases resources (the SQLite handle in offline mode).
Returns
Section titled “Returns”void
lookup()
Section titled “lookup()”lookup(
ref):Promise<Work>
The work a ref points at. Rejects with CourmapError (not_found, invalid_input, ambiguous).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Work>
meta()
Section titled “meta()”meta():
Promise<Meta>
Returns
Section titled “Returns”Promise<Meta>
resolve()
Section titled “resolve()”resolve(
releaseName,options?):Promise<ResolveResult>
A release name to its work and episode, with confidence and competing candidates. status is ok only for a clear winner; otherwise ambiguous (candidates listed) or unmatched.
Parameters
Section titled “Parameters”releaseName
Section titled “releaseName”string
options?
Section titled “options?”ResolveOptions
Returns
Section titled “Returns”Promise<ResolveResult>
search()
Section titled “search()”search(
query,limit?):Promise<WorkSummary[]>
Works whose titles or aliases match the query, best first.
Parameters
Section titled “Parameters”string
limit?
Section titled “limit?”number
Returns
Section titled “Returns”Promise<WorkSummary[]>
translate()
Section titled “translate()”translate(
ref,episode,targets):Promise<TranslateResult>
One episode in every requested numbering. targets are provider names or “absolute”.
Targets the work cannot map are listed in unmapped and set status to “unmapped”.
Parameters
Section titled “Parameters”string
episode
Section titled “episode”targets
Section titled “targets”readonly string[]
Returns
Section titled “Returns”Promise<TranslateResult>
This product uses the TMDB API but is not endorsed or certified by TMDB.