Game library inventories are used to audit the games in the Library.
You must have either the catalog
or checkouts
LibraryPrivilege to access a Library Inventory.
See "Object Properties" in Introduction for basic shared properties.
Complete details in LibraryInventoryProperties.
See "Related Objects" in Introduction for how to use them.
The Library that this inventory is for.
See "Relationships" in Introduction for how to use them.
The LibraryInventoryItems associated with the inventory.
The services used to fetch and manipulate library inventories.
Note that there is no generalized, contextless library inventory search endpoint. There is currently no use for this within the app.
GET /api/libraryinventory/xxx
Returns:
{ "id" : "xxx", "date_created" : "2019-01-27 12:15:00", ... }
POST /api/libraryinventory
A name
for the Inventory. To allow easier reference (than reading the date_created
) if the user might have multiple Inventories existing at one time.
Returns the same as a normal read.
PUT /api/libraryinventory/xxx
Returns the same as a normal read.
Only used for updating an Inventory's name
. See Services below for specific endpoints for updating an Inventory's status
.
DELETE /api/libraryinventory/xxx
Deletes all related LibraryInventoryItems in addition to the Inventory record.
Returns:
{ "success" : 1 }
PUT /api/libraryinventory/xxx/activate
Changes the Inventory's status
to "active". Fails if there is already an active Inventory for the Library.
Returns the same as a normal read.
PUT /api/libraryinventory/xxx/close
Changes the Inventory's status
to "closed". Games cannot be counted in the Inventory if it is closed.
Returns the same as a normal read.
GET /api/libraryinventory/xxx/missing_games
The LibraryGames which are not counted in the Inventory.
Returns:
{ "paging" : {...}, "items" : [ { "id" : "xxx", "name" : "Why Didn't You Count Me??", ... }, ... ] }
POST /api/libraryinventory/xxx/item
The ID of the LibraryGame being counted for the Inventory.
Returns added LibraryInventoryItem:
{ "id" : "xxx", "libraryinventory_id" : "xxx", "librarygame_id" : "xxx", ... }
DELETE /api/libraryinventory/xxx/item/:item_id
The ID of the LibraryInventoryItem to delete.
Returns:
{ "success" : 1 }