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

Commits on Nov 16, 2021

  1. Refactor context handler usage

    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.
    jamietanna committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    ca4aae9 View commit details
    Browse the repository at this point in the history
  2. Log which handler has been used for context retrieval

    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.
    jamietanna committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    719ef68 View commit details
    Browse the repository at this point in the history
  3. Add support for reads

    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.
    jamietanna committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    4c0e8ce View commit details
    Browse the repository at this point in the history
  4. Add context retrieval for reads via books-mf2

    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.
    jamietanna committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    2748f2b View commit details
    Browse the repository at this point in the history