Closed MxIllusionment closed 3 years ago
Handles the inventory for a specific character, allowing items in the item list to be added, deleted, and have quantity changed.
GET: /api/characters/:character-id/inventory Returns item ID, item Name, and item Quantity for all items in a character's inventory
POST: /api/characters/:character-id/inventory Send JSON with item ID to add that item to a character's inventory
DELETE: /api/characters/:character-id/inventory/:item-id Remove an item from a character's inventory
PUT: /api/characters/:character-id/inventory/:item-id Send JSON with item Quantity to update that item's quantity in the character's inventory
GET JSON:
{ id: number, name: string, quantity: number }
POST JSON:
{ id: number }
PUT JSON:
{ quantity: number }
Handles the inventory for a specific character, allowing items in the item list to be added, deleted, and have quantity changed.
GET: /api/characters/:character-id/inventory Returns item ID, item Name, and item Quantity for all items in a character's inventory
POST: /api/characters/:character-id/inventory Send JSON with item ID to add that item to a character's inventory
DELETE: /api/characters/:character-id/inventory/:item-id Remove an item from a character's inventory
PUT: /api/characters/:character-id/inventory/:item-id Send JSON with item Quantity to update that item's quantity in the character's inventory