The items in the Unigames Library can be queried using the API. At the moment, this is mainly used for the Discord bot.
An Item object contains the following information:
'id'- The ID of the item.
'name'- The item's name.
'description'- The description of the item.
'url'- The URL of the item as it exists on the Unigames website.
'type'- Indicates the type of the item. Will either be:
'BG'- Board Game
'CG'- Card Game
'is_borrowable'- Boolean indicating whether the item can be borrowed.
'image'- The URL of the image of this item.
'availability'- Another JSON object representing the availability of the object. Contains the following:
'in_clubroom'- Boolean indicating whether the item is in the clubroom.
'is_available'- Boolean indicating whether the item is available to be borrowed.
'expected_availability_date'- If the item is unavailable and can be available, this will show the date that it should be returned by. Another will be None.
'max_due_date'- If the item can be borrowed, what's the maximum date you could borrow it until. Otherwise will be None.
There are four endpoints you can use to access library items at this time.
- Returns a random item from the library.
- Returns a random item of the Book type from the library.
- Returns a random item of the Board Game type from the library.
- Returns a random item of the Card Game type from the library.