You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A "file" is a regular file that can be added to the steamapps/common/devildaggers/mods directory to change game assets on load.
What
Compute a hash value for each file available for download on the website.
Update the /api/mods/{id} endpoint to include the computed hash value in its response.
Add a new endpoint /api/mods/by-hash to allow searching for mods by their hash value.
Why
Including a hash value for each file ensures data integrity and allows users to identify authorship of files that have been renamed locally. Additionally, providing a search endpoint by hash value enhances the usability of the API by enabling users to quickly locate specific files based on their hash.
Acceptance Criteria
Hash Computation:
A hash value (e.g., MD5, SHA-1) is computed for each file available for download.
The hash value is computed and stored at the time of file upload or when the file is first made available for download.
The implementation handles existing files and ensure that their hash values are computed and stored without requiring re-upload.
API Endpoint Update:
The /api/mods/{id} endpoint includes the computed hash value in its JSON response.
Example response:
{
"name": "Outlines",
"htmlDescription": "This mod adds a subtle highlight of objects on the black background. It makes DD look brighter and softer overall and might help you spotting enemies in the dark. There're two variants in the folder and both demonstrated on the screenshots below",
"url": "",
"trailerUrl": null,
"authors": [
"Stephanstein"
],
"lastUpdated": "2024-06-05T15:42:29.473178",
"modTypes": 8,
"isHosted": true,
"containsProhibitedAssets": false,
"modArchive": {
"fileSize": 3065,
"fileSizeExtracted": 8816,
"binaries": [
{
"name": "dd-Outlines-a_outline",
"size": 4408,
"modBinaryType": 1,
"containsProhibitedAssets": false,
"assets": [
{
"type": 16,
"name": "post_combine",
"size": 4367,
"isProhibited": false
}
],
"modifiedLoudness": null,
"md5": "cde684c1343231202c4473f8a9911e85"
},
{
"name": "dd-Outlines-a_outline_softer",
"size": 4408,
"modBinaryType": 1,
"containsProhibitedAssets": false,
"assets": [
{
"type": 16,
"name": "post_combine",
"size": 4367,
"isProhibited": false
}
],
"modifiedLoudness": null,
"md5": "e18882f3afb618d523c4668a95e281bb"
}
]
},
"screenshotFileNames": [
"00.png",
"01.png",
"02.png"
]
}
New Search Endpoint:
A new endpoint /api/mods/by-hash is created.
The endpoint accepts a query parameter hash and returns a list with the details for any mod including a file with the specified hash exists.
Example request: GET /api/mods/by-hash?hash=abc123def4567890abc123def4567890
The text was updated successfully, but these errors were encountered:
Vocabulary
mod
A "mod" is a collection of one or more files.
file
A "file" is a regular file that can be added to the
steamapps/common/devildaggers/mods
directory to change game assets on load.What
/api/mods/{id}
endpoint to include the computed hash value in its response./api/mods/by-hash
to allow searching for mods by their hash value.Why
Including a hash value for each file ensures data integrity and allows users to identify authorship of files that have been renamed locally. Additionally, providing a search endpoint by hash value enhances the usability of the API by enabling users to quickly locate specific files based on their hash.
Acceptance Criteria
Hash Computation:
API Endpoint Update:
The
/api/mods/{id}
endpoint includes the computed hash value in its JSON response.Example response:
New Search Endpoint:
/api/mods/by-hash
is created.hash
and returns a list with the details for any mod including a file with the specified hash exists.GET /api/mods/by-hash?hash=abc123def4567890abc123def4567890
The text was updated successfully, but these errors were encountered: