Skip to content

Reference

tilttek/game-shelf

Every public type of the package, with its role. The types marked internal may change in any version.

Shelves

TypeRole
GameShelvesThe service: copies, wishes and their order, notes, visibility, import and the games members can bring.
ShelfA member's shelf: its copies, its wishes in the member's order, its notes, its visibility and its version.
CopyA box: its game, its statuses, its edition, its location, whether it can be brought and whether an import placed it.
CopyStatusOwned, previously owned, preordered or for trade.
WishA game wished, its kinds and its level.
WishKindWishlist, want to buy, want in trade or want to play.
WishLevelFrom "must have" to "don't buy this".
NoteA member's rating, comment, tags and plays of a game.
VisibilityPrivate, members or public.
ViewerThe member, another member, or anyone.
ShelfViewWhat a viewer sees of a shelf.
BringableGameA game a member can bring to a game night.
ShelfImportWhat an import changed.
ImportModeWhether an import adds only, or synchronizes the imported copies with the file.

Export

TypeRole
Export\ShelfCsvWrites a view as CSV: the copies, the wishlist and the notes.

Ports and stores

TypeRole
Contract\ShelfStoreKeeps the shelves at a version.
Contract\ShelfObserverTold of the events of a shelf.
Store\InMemoryShelfStoreThe shelves in memory, for tests.

Events

TypeRole
Event\ShelfEventEvery event: the member and the game.
Event\CopyAddedA copy was placed.
Event\CopyRemovedA copy was taken off.
Event\CopyOfferedForTradeA copy became for trade.
Event\CopyWithdrawnFromTradeA copy is no longer for trade.
Event\GameWishedA game joined the wishlist.
Event\WishWithdrawnA game left the wishlist.

Exceptions

TypeRole
Exception\ShelfExceptionEvery exception of the library.
Exception\InvalidShelfA value out of its shape or its bounds.
Exception\ShelfRefusedA change the shelf does not allow.
Exception\ShelfConflictThe shelf changed since it was read.

Internal

TypeRole
Internal\IdentifierThe shape of the identifiers. Internal.
Internal\TextThe shape of the texts a member writes. Internal.