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 LibraryGames associated with (counted in) the inventory. See LibraryGame for available search options.
The LibraryInventoryItems associated with the inventory.
The LibraryInventoryItems associated with the inventory. Deprecated, use items instead.
See "Includes" in Introduction for how to use them.
Count of games added to the Library since the start of the Library Inventory.
Count of all games in the Library.
Number of games not counted in the Inventory.
Just the games_in_library count minus the games_counted.
The services used to fetch and manipulate library inventories.
Searching all library inventories across libraries is not supported. To search on a single library see "Relationships" in Library.
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 following endpoint is deprecated, use the above.
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
}