Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tracking reading #27

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Nov 16, 2021

  • Refactor context handler usage
  • Log which handler has been used for context retrieval
  • Add support for reads
  • Add context retrieval for reads via books-mf2

WIP:

To make this more scalable, as we add more handlers for retrieving
context, we can use a `getHandler` method that can provide the relevant
handler.

This then allows us to pass around that handler, not worrying what it
is, just that it's doing its job.
To better improve visibility of which context retrieval handler has been
used, we can add a `name` to each handler that can be logged when
retrieving.

In the case of our fallback to OpenGraph, we can log a slightly more
appropriate message.
To allow tracking of books that are being read by folks, we can
introduce the `read` post type.

This also includes sample data for three common types of reads:

- an `h-cite` from data from books-mf2.herokuapp.com
- a URL cite to books-mf2.herokuapp.com
- an `h-cite` from https://indiebookclub.biz

To allow for better visualisation in editors, we can also hint which
expected properties are available, and required.
Using the service books-mf2, we can retrieve the context for read data.

As it's a Heroku-based app, there's the risk that this can timeout, so
we need to increase the timeouts available for context retrieval events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant