BookWyrm uses the ActivityPub protocol to send and receive user activity between other BookWyrm instances and other services that implement ActivityPub, like Mastodon. To handle book data, BookWyrm has a handful of extended Activity types which are not part of the standard, but are legible to other BookWyrm instances.
User relationship interactions follow the standard ActivityPub spec.
Follow: request to receive statuses from a user, and view their statuses that have followers-only privacy
Accept: approves a
Followand finalizes the relationship
Reject: denies a
Block: prevent users from seeing one another's statuses, and prevents the blocked user from viewing the actor's profile
Update: updates a user's profile and settings
Delete: deactivates a user
Undo: reverses a
Note: On services like Mastodon,
Notes are the primary type of status. They contain a message body, attachments, can mention users, and be replies to statuses of any type. Within BookWyrm,
Notes can only be created as direct messages or as replies to other statuses.
Review: A review is a status in response to a book (indicated by the
inReplyToBookfield), which has a title, body, and numerical rating between 0 (not rated) and 5.
Comment: A comment on a book mentions a book and has a message body.
Quotation: A quote has a message body, an excerpt from a book, and mentions a book.
Create: saves a new status in the database.
Note: BookWyrm only accepts
Create activities if they are:
Notes with the privacy level
direct, which mention a local user),
Delete: Removes a status
Like: Creates a favorite on the status
Announce: Boosts the status into the actor's timeline
Undo: Reverses a
User's books and lists are represented by
Shelf: A user's book collection. By default, every user has a
readshelf which are used to track reading progress.
List: A collection of books that may have items contributed by users other than the one who created the list.
Create: Adds a shelf or list to the database.
Delete: Removes a shelf or list.
Add: Adds a book to a shelf or list.
Remove: Removes a book from a shelf or list.
Because BookWyrm uses custom object types (
Quotation) that aren't supported by ActivityPub, statuses are transformed into standard types when sent to or viewed by non-BookWyrm services.
Reviews are converted into
Quotations are converted into
Notes, with a link to the book and the cover image attached.