Games contained in a Library.
Library Games are accessed via /api/librarygame.
See "Object Properties" in Introduction for basic shared properties.
Complete details in LibraryGameProperties.
See "Related Objects" in Introduction for how to use them.
The LibraryGameCheckout most recently created for this game.
The Library this game belongs to.
See "Relationships" in Introduction for how to use them.
The LibraryGameCheckouts created for this game.
The LibraryInventoryItems created for this game.
The PlayToWins associated with this library game.
The services used to fetch and manipulate library games.
This section describes basic searchability of Library Games, which is now available across different endpoints.
To request events, a user must make a request via an endpoint for a parent object. The parent objects for which this consolidated search behavior is valid are:
Departures/differences from basic behavior will be discussed in the documentation for the specific parent=>event relationship.
(The old endpoint GET /api/librarygame,
which allowed searching across libraries,
has been made admin-only.)
Returns:
{
"paging" : {...},
"items" : [
{
"id" : "xxx",
"name" : "The Captain Is Dead",
...
},
...
]
}
Pass a string query to search for a partial match in specifically allowed text fields.
(can be searched only by specifying field with query_field=catalog_number; see options below)
(can be searched only by specifying field with query_field=description; see options below)
name is automatically searched if you pass a string value in the query parameter. It is the only automatically searched field.
(can be searched only by specifying field with query_field=publisher_name; see options below)
For Library Games, query now supports multiple match terms at once. To do this, merely separate your search terms with commas. So where the term "The Captain Is Dead" will return any Library Game matching all of "The Captain Is Dead", the term "Captain,Dead" will return all Library Games with names matching either Captain or Dead. (Any whitespace around the commas is automatically removed; "Captain, Dead" and "Captain ,Dead" are equivalent to "Captain,Dead".)
To prevent a query parameter with a comma in it from being split into multiple terms, include query_single_term=1.
Use of query will search only in the text field name by default. Alternate fields to query are catalog_number, description, and publisher_name. Simply set query_field to the field you want to search in.
availability is a way of getting different result sets with one setting. There are four valid values for availability:
Same as is_checked_out=0 and is_in_circulation=1.
Same as is_checked_out=1. Deprecated version of this setting is checkedout.
Same as is_in_circulation=0. Deprecated version of this setting is notincirc.
Same as due_for_triage=1.
Same as passing min_players=<=x&max_players=>=x, where x is the number of preferred players.
Same as passing min_play_time=<=x&max_play_time=>=x, where x is the preferred time in minutes.
POST /api/librarygame
Returns the same as a normal read.
GET /api/librarygame/xxx
Returns:
{
"id" : "xxx",
"name" : "The Captain is Dead",
...
}
PUT /api/librarygame/xxx
Returns the same as a normal read.
DELETE /api/librarygame/xxx
Returns:
{
"success" : 1
}
POST /api/librarygame/xxx/add-comment
Adds a comment to the Library Game log. User session must be active.
Returns:
{
"success" : 1
}