Add a new service adapter for the MobyGames API, to separate concerns
with RomM's handler for metadata.
This adapter is agnostic to the handler and only provides methods to
interact with the API, and correctly return typed responses.
Add a new service adapter for the SteamGridDB API, to separate
concerns with RomM's handler for metadata.
This adapter is agnostic to the handler and only provides methods to
interact with the API, and correctly return typed responses.
Add a new service adapter for the ScreenScraper API, to separate
concerns with RomM's handler for metadata.
This adapter is agnostic to the handler and only provides methods to
interact with the API, and correctly return typed responses.
Iterate through all pages of user completion progress in the
RetroAchievements service, instead of limiting the data retrieval to the
first 500 results.
This change replaces the `httpx` client with `aiohttp` for the
RetroAchievements API service.
The main reason for this change is that `httpx` has an unavoidable log
line with `INFO` level, which includes the request full URL, containing
the user's API key.
`httpx` has had an
[open discussion](https://github.com/encode/httpx/discussions/2765)
regarding this security issue for almost two years.
The change to `aiohttp` is painless, and would allow us to migrate more
of the codebase to it in the future, to avoid leaking sensitive
information in logs.
Add a new service adapter for the RetroAchievements API, to separate
concerns with RomM's handler for metadata. This adapter is agnostic
to the handler and only provides methods to interact with the
API, and correctly return typed responses.
The API authorization was also improved to be handled by a specific
`httpx.Auth` class that sets the `y` parameter for each request.
The short-term goal is to completely typehint the IGDB API responses. This
first change adds the base structures and enums RomM currently uses.
The `ExpandableField` type will allow us to model the expansion
mechanism the IGDB API provides, where a field can include either an ID,
or the full nested structure.
Build and include the `RAHasher` binary in the Docker image, to
calculate hashes for RetroAchievements. Also, add a service to
run `RAHasher` from Python.
Example usage:
```python
from adapters.services.rahasher import RAHasherError, RAHasherService
rahasher = RAHasherService()
try:
hash = await rahasher.calculate_hash("nes", Path("path/to/rom.nes"))
except RAHasherError:
# Handle error
hash = None
```