Skip to content

Tankōbon / preload / StatsApi

Interface: StatsApi ​

Defined in: preload.ts:168

Reading history for the statistics page, as window.tankobon.stats.

Methods ​

addReadingTime() ​

addReadingTime(libraryId, seconds): Promise<void>

Defined in: preload.ts:172

Adds seconds (1 to 3600) of reading time on a library entry to today; the reader reports it every few minutes while a book is open.

Parameters ​

libraryId ​

string

seconds ​

number

Returns ​

Promise<void>


clearHistory() ​

clearHistory(): Promise<void>

Defined in: preload.ts:176

Deletes the active user's reading history (the time spent per book and day, hence the statistics' reading time too); books, progress and completion dates are kept.

Returns ​

Promise<void>


get() ​

get(): Promise<ReadingStats>

Defined in: preload.ts:170

The reading history: the dates at which books were finished and the reading time per day, oldest first.

Returns ​

Promise<ReadingStats>


history() ​

history(): Promise<ReadingHistoryEntry[]>

Defined in: preload.ts:174

The active user's reading history for the profile page: reading time per day and book, most recent first, at most 200 lines.

Returns ​

Promise<ReadingHistoryEntry[]>