Skeudenn / preload / MetadataApi
Interface: MetadataApi ​
Defined in: src/preload.ts:184
Book information lookups in public APIs, as window.tankobon.metadata.
Methods ​
apply() ​
apply(
id,update,coverUrl):Promise<LibraryEntry|null>
Defined in: src/preload.ts:192
Saves what the user accepted in the lookup dialog: updates the library entry, rewrites the .nfo beside the file and makes the cover thumbnail if it has none, or replaces it with the picture at coverUrl (an address of the sources' cover hosts, else ignored; a picture that can't be downloaded keeps the current cover); resolves with the updated entry, or null if it is gone.
Parameters ​
id ​
string
update ​
coverUrl ​
string | null
Returns ​
Promise<LibraryEntry | null>
cancel() ​
cancel():
Promise<void>
Defined in: src/preload.ts:190
Stops the lookup this window is waiting for (search() or fromPage()): its requests are aborted and the call fails. Does nothing when none is under way.
Returns ​
Promise<void>
fromPage() ​
fromPage(
url):Promise<MetadataPageResult>
Defined in: src/preload.ts:188
Reads a book from the page at url, a link the user pasted (Bédéthèque album, BDfugue product or Nautiljon volume).
Parameters ​
url ​
string
Returns ​
Promise<MetadataPageResult>
search() ​
search(
query):Promise<MetadataSearchResult>
Defined in: src/preload.ts:186
Looks a book up in the public APIs enabled in the settings (Comic Vine, Google Books), or only in those named by query.sources.
Parameters ​
query ​
Returns ​
Promise<MetadataSearchResult>