Files
go-igdb/client.go
nite aaf697a005 refactor: Improve endpoint robustness and client clarity
Refactored client request parameter naming and enhanced endpoint methods for better validation and idiomatic behavior.

- Renamed `URL` parameter to `requestURL` in `Client.Request` for improved clarity and to avoid potential naming conflicts.
- Added validation to `BaseEndpoint.GetByID` to prevent queries with an ID of 0, returning an error.
- Modified `BaseEndpoint.GetByIDs` to return an empty slice (`[]*T{}`) instead of an error when no IDs are provided, aligning with common Go idioms for empty result sets.
- Enhanced `BaseEndpoint.Count` method to return an error if the API reports a count of 0, ensuring that a successful count operation always yields a positive result.
2025-11-03 18:25:53 +11:00

5.7 KiB