Library Game Checkout

When someone "rents" a LibraryGame one of these is created to keep track of that rental. Library Game Checkouts are accessed via /api/librarygamecheckout.

Properties

See "Object Properties" in Introduction for basic shared properties.

Complete details in LibraryGameCheckoutProperties. It also has the following read-only properties:

default_minutes

The time between the checkout's date_created and checkin_date in minutes.

checkout_time_changed

A flag that will appear (value "1") only if the checkout's checkedout_seconds rounded to minutes is different from the default minutes.

Related Objects

See "Related Objects" in Introduction for how to use them.

badge

The Badge associated with this checkout, if any.

convention

The Convention associated with this checkout, if any.

library

The Library this library game checkout belongs to.

librarygame

The LibraryGame this library game checkout belongs to.

user

The User associated with this checkout, if any.

Services

The services used to fetch and manipulate library game checkouts.

Search Library Game Checkouts

This will search across all libraries. To search on a single library see "Relationships" in Library.

 GET /api/librarygamecheckout
Optional Params
query

Searches a partial renter_name.

Returns:

 {
    "paging" : {...},
    "items" : [
        {
          "id" : "xxx",
          "renter_name" : "Andy Dufresne",
          ...
        },
        ...
    ]
 }

Create Library Game Checkout

 POST /api/librarygamecheckout
Required Params
library_id
librarygame_id
renter_name

Returns the same as a normal read.

Read Library Game Checkout

 GET /api/librarygamecheckout/xxx

Returns:

 {
   "id" : "xxx",
   "renter_name" : "Andy Dufresne",
   ...
 }

Update Library Game Checkout

 PUT /api/librarygamecheckout/xxx

Returns the same as a normal read.

Delete Library Game Checkout

 DELETE /api/librarygamecheckout/xxx

Returns:

 {
   "success" : 1
 }

Check In

This returns a game to the library that has been checked out.

 POST /api/librarygamecheckout/xxx/checkin
Optional Params
checkedout_seconds

The duration of the check-out time in seconds. Include this if you want the checkedout_seconds to be shorter or longer than the time between the checkout date_created and the checkin_date.

checkout_time_changed_note

An explanatory note why the checkout time is being changed. This note will be added to the LibraryGame log.

Returns the same as a normal read.

Reset Checkout Time

This will change the checkedout_seconds value of the checkout, and make an entry in the LibraryGame log of the change.

 POST /api/librarygamecheckout/xxx/reset-checkout-time
Required Params
checkedout_seconds

The duration of the check-out time in seconds.

Optional Params
checkout_time_changed_note

An explanatory note why the checkout time is being changed. This note will be added to the LibraryGame log.

Returns the same as a normal read.