Card Binder Service #496

Open
opened 2026-04-28 18:05:47 +01:00 by Vylpes · 0 comments
Owner

Epic: #281
Story Points:


SO THAT I can easily call the database from the commands to get and view binder information

Acceptance Criteria

GIVEN I am a developer
WHEN I call BinderHelper.GetPage(UserId: string, PageNumber: number)
THEN I will receive an array of 9 pages for the user's binder page specified

GIVEN I am a developer
WHEN I call BinderHelper.GetPage
AND the slot or page is empty
THEN I will receive a null in its place

GIVEN I am a developer
WHEN I call BinderHelper.PlaceCard(UserId: string, CardNumber: string, PageNumber: number, Index: number)
THEN the card will be placed and saved to the database
AND the Inventory instance will be marked as InBinder TRUE

GIVEN I am a developer
WHEN I call BinderHelper.PlaceCard
AND the index is already taken
THEN I will receive an error returned

GIVEN I am a developer
WHEN I call BinderHelper.RemoveCard(UserId: string, PageNumber: number, Index: number)
THEN the card will be empied from that slot
AND the Inventory instance will be marked as InBinder FALSE (as long as its not in another slot also)

GIVEN I am a developer
WHEN I call BinderHelper.RemoveCard
AND the slot is empty
THEN I will receive an error returned

GIVEN I am a developer
WHEN I call `BinderHelper.RenderPageEmbed(UserId: string, PageNumber: number)
THEN I will receive the discord embed object with the page
AND the rendered image attachment

Subtasks

  • Add BinderHelper.GetPage function
  • Add BinderHelper.PlaceCard function
  • Add BinderHelper.RemoveCard function
  • Add BinderHelper.RenderPageEmbed function
  • Add tests
  • Add documentation

Notes

  • The empty slot will be rendered from an image in the google drive synced storage (/BINDER_EMPTY.png)
Epic: #281 Story Points: --- SO THAT I can easily call the database from the commands to get and view binder information ## Acceptance Criteria GIVEN I am a developer WHEN I call `BinderHelper.GetPage(UserId: string, PageNumber: number)` THEN I will receive an array of 9 pages for the user's binder page specified GIVEN I am a developer WHEN I call `BinderHelper.GetPage` AND the slot or page is empty THEN I will receive a `null` in its place GIVEN I am a developer WHEN I call `BinderHelper.PlaceCard(UserId: string, CardNumber: string, PageNumber: number, Index: number)` THEN the card will be placed and saved to the database AND the Inventory instance will be marked as InBinder TRUE GIVEN I am a developer WHEN I call `BinderHelper.PlaceCard` AND the index is already taken THEN I will receive an error returned GIVEN I am a developer WHEN I call `BinderHelper.RemoveCard(UserId: string, PageNumber: number, Index: number)` THEN the card will be empied from that slot AND the Inventory instance will be marked as InBinder FALSE (as long as its not in another slot also) GIVEN I am a developer WHEN I call `BinderHelper.RemoveCard` AND the slot is empty THEN I will receive an error returned GIVEN I am a developer WHEN I call `BinderHelper.RenderPageEmbed(UserId: string, PageNumber: number) THEN I will receive the discord embed object with the page AND the rendered image attachment ## Subtasks - Add `BinderHelper.GetPage` function - Add `BinderHelper.PlaceCard` function - Add `BinderHelper.RemoveCard` function - Add `BinderHelper.RenderPageEmbed` function - Add tests - Add documentation ## Notes - The empty slot will be rendered from an image in the google drive synced storage (`/BINDER_EMPTY.png`)
Vylpes added this to the 0.12.0 milestone 2026-04-28 18:05:47 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
External/card-drop#496
No description provided.