16colo-rs / 16c

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

API pack details does not include year #90

Closed michael-lazar closed 1 week ago

michael-lazar commented 1 week ago

I'm fetching pack details one-at-a-time via the API, based on the name of the pack.

For example,

https://api.16colo.rs/v1/pack/laz18?archive=true

The API response includes the name of the archive

"archive":"laz18.zip"

However, without the year the pack was published, I can't build the full path to the archive on 16colo.rs:

https://16colo.rs/archive/2024/laz18.zip

It would be helpful if the /v1/pack/:name endpoint also returned the year that the pack was published, like the /v1/pack/ endpoint does already.

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

https://16colo.rs/api.php#pack-name