Skip to content

Extension points

tilttek/reading-quests

The package is at 0.x: its extension points are stable only from its 1.0 release. Until then, a minor version may change them, and its CHANGELOG says how.

ToDo
Keep the booksImplement BookShelfInterface on the application's catalogue, or build an InMemoryBookShelf at warm-up.
Keep the readingStore the Progress of phil/reading-progress by reader, document and reading number.
Keep the journalGive ReadingRecorder and ReadingGoals the Journal of tilttek/activity, on the application's ActivityLog.
Count in pages or minutesPass ReadingActivities the ReadingMeasure of the site.
Record the activities yourselfCall ReadingActivities::between() and record what it returns in a journal or a queue of your own.
Build the questsUse ReadingSteps, or write the verbs of ReadingVerbs in the quests' configuration.
Select books by more factsPut the facts on the books; a step reads them by name.
Read the goals of many readersKeep their totals in a projection of tilttek/activity over the verbs book.*.
Declare the verbsPass the journal ReadingVerbs::ALL among its declared verbs.

What the library does not do

It keeps no state, sends no message and calls no service: it reads the progress given, writes to the journal given and returns. It never reads the time a page stays on screen, the reader's name or account, or the text of a book: an activity carries a resource reference of the reader, a reference of the book and the book's facts.

Erasing a reader

The library stores nothing of a reader. Erasing one is erasing their activities with Journal::erase() of tilttek/activity and their stored progress in the application; the quests forget what they kept of them with their own erasure.