12 Commits

Author SHA1 Message Date
395e87d373
generic: net return full response struct
This is still quite easy to stub, and the extra information is very
useful to the caller.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-19 21:33:21 +09:00
0999ccd211
cmd/msrfetch: preserve metadata order
The composite maps are no longer needed as the new Album variant makes
more sense than them. They are also unordered while the base variants of
both endpoints are ordered. Composite is therefore only used for
validation in the current implementation.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-18 21:56:45 +09:00
b5f5626b02
album: extend struct for /api/album/%d/data
This also includes tests against a sample response from the
https://monster-siren.hypergryph.com/api/album/1030/data endpoint.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-18 19:29:23 +09:00
21871a387c
generic: return content length alongside body
This increases efficiency for bigger response bodies.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-18 06:06:52 +09:00
343a8c5f45
generic: provide configured encoder
This encoder emits data identical to upstream API response body.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-18 04:53:12 +09:00
bb1164d081
song: enrich metadata from API
This should be the last of the API interactions we need.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-18 04:10:38 +09:00
2d6b87702d
generic: move StringInt padding to string method
This allows the implementation to be reused for url and filename
formatting in the downloader.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-17 08:02:18 +09:00
c2c4171a3a
generic: emulate nullable string behaviour
This fills the gap for nullable strings returned by the API.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-17 07:47:57 +09:00
7dd470f9ae
generic: struct for response common fields
This is common across all responses.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-17 06:57:16 +09:00
b001ef50aa
generic: pad for different lengths
This can be autodetected based on existing string.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-17 06:40:35 +09:00
cc45f04800
generic: pad string representation
This replicates api behaviour.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-17 06:01:00 +09:00
5b9d1e4fe8
generic: parse string representation of integer
This makes the data easier to handle down the pipeline.

Signed-off-by: Yonah <contrib@gensokyo.uk>
2025-09-17 05:41:40 +09:00