Library
Drop supports having more than one library 'source' enabled at a time. This allows users to use multiple folders on their server, and merge all the separate libraries into one.
Each library source has a specific type, which defines how it connects to games:
- Drop-style (internally
Filesystem
). The default and recommended type, it supports the versioned folders that Drop was built for. - Compatibility (internally
FlatFilesystem
). Implemented for compatibility with GameVault and similar libraries, doesn't use versioned folders.
You can read more about the user's side of things on the docs: Library Sources.
We plan to add network-based library sources in the future, so keep this in mind when using the endpoints. They may take longer to return values in the future.
The game model
The game model stores most of the metadata attached to the game, and is used to render store pages and display in clients.
Properties
- Name
id
- Type
- string
- Description
UUID of the game. Used internally to refer to this game.
- Name
metadataSource
- Type
- string
- Description
ID of the metadata sourced originally used to import this game.
- Name
metadataId
- Type
- string
- Description
Internal metadata source's ID for the original import.
- Name
created
- Type
- timestamp
- Description
Timestamp of when this game was originally created.
- Name
libraryId
- Type
- string
- Description
ID of library source this game is linked to.
- Name
libraryPath
- Type
- string
- Description
Path within the library source this game is linked to.
- Name
mName
- Type
- string
- Description
The name of this game.
- Name
mShortDescription
- Type
- string
- Description
A short description of this game, without requiring formatting.
- Name
mDescription
- Type
- markdown
- Description
A markdown representation of the long-form description of this game.
- Name
mReleased
- Type
- timestamp
- Description
When this game was released.
- Name
mIconObjectId
- Type
- string
- Description
Object ID of icon.
- Name
mBannerObjectId
- Type
- string
- Description
Object ID of background banner. Usually a wide, high-resolution image.
- Name
mCoverObjectId
- Type
- string
- Description
Object ID of cover. Usually a tall image with the title of the game.
- Name
mImageCarouselObjectIds
- Type
- string[]
- Description
Array of object IDs shown on the store's carousel.
- Name
mImageLibraryObjectIds
- Type
- string[]
- Description
An array of all object IDs linked to this game.
- Name
featured
- Type
- boolean
- Description
Whether or not this game is featured for the carousel.
Internal IDs and metadata
Admin-provided metadata
Metadata flags
Fetch library
This endpoint fetches all unimported and imported games.
Response values
- Name
unimportedGames
- Type
- object
- Description
An object of library ID to paths that are yet to be imported.
- Name
games
- Type
- array
- Description
An array of game objects with attached status.
- Name
game
- Type
- object
- Description
A metadata game object. Refer to the game model.
- Name
status
- Type
- string | object
- Description
A field indicating the status of this game.
If it is a string, it'll be "offline", which means that the library source this game is connected to isn't working right now.
If it's an object, it'll look like:
{ "noVersions": false, "unimportedVersions": [] }
Request
curl -G http://localhost:3000/api/v1/admin/library \
-H "Authorization: Bearer {token}"
Response
{
"unimportedGames": {
"myLibraryId": [ // These are paths on disk
"My Game",
"My Other Game",
"Horizon Zero Dawn"
],
"myOtherLibraryId": []
},
"games": [
{
"game": { ... },
"status": {
"noVersions": false,
"unimportedVersions": []
}
},
{
"game": { ... },
"status": "offline"
}
]
}