16colo-rs / 16c

16colo.rs ANSI/ASCII Archive
5 stars 1 forks source link

API fileid priority #89

Closed michael-lazar closed 1 week ago

michael-lazar commented 1 week ago

It appears that DIZ files will always take priority over ANS files for the fileid field in the pack details API.

Based on the documentation, I'm expecting it to work the other way around:

fileid the filename considered to be the most prominent FILE_ID.DIZ, in case of multiple files, the extentions priority is ANS, DIZ, ASC

Example:

https://api.16colo.rs/v1/pack/mist0624

{
   "fileid":"FILE_ID.DIZ",
   "fileids":["FILE_ID.ANS","FILE_ID.DIZ"],
   ...
}
bart-d commented 1 week ago
    "results": [{
            "year": 2024,
            "files": {...},
            "fileid": "FILE_ID.ANS",
            "fileids": ["FILE_ID.ANS", "FILE_ID.DIZ"],
            "archive": "mist0624.zip",
            "download": "https:\/\/16colo.rs\/archive\/2024\/mist0624.zip",
            "gallery": "https:\/\/16colo.rs\/pack\/mist0624"
        }
    ]