Repository navigation
0.7.0
·
127 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
Closes out ISteamApps with UpToDateCheck, GetServersAtAddress and GetSDRConfig, and adds timeouts, retries and an optional API key to SteamConfig. Contains breaking changes.
Added
- UpToDateCheckRequest (ISteamApps) with the AppVersionCheck DTO, telling whether a game server's version is current and which one Steam requires, reached anonymously through the new AppsResource as
$connector->apps()->upToDateCheck(). Steam answers an app ID it does not know exactly like a game running no versioned servers, so both raise the new AppVersionUnavailableException (#64). - GetServersAtAddressRequest (ISteamApps) with the GameServer DTO and the ServerRegion enum, listing the game servers Steam knows at an IPv4 address, reached anonymously as
$connector->apps()->serversAtAddress(). An address Steam rejects raises the new InvalidServerAddressException (#65). - GetSdrConfigRequest (ISteamApps) with the SdrConfig, SdrPointOfPresence and SdrRelay DTOs, mapping the Steam Datagram Relay network a game connects through, reached anonymously as
$connector->apps()->sdrConfig(). An app ID Steam does not know raises AppNotFoundException at once rather than being retried (#66). - connectTimeout and requestTimeout on SteamConfig, in seconds, falling back to Saloon's 10 and 30 when left null.
0disables the limit and a negative value throws InvalidTimeoutException (#61). - tries, retryInterval (in milliseconds) and exponentialBackoff on SteamConfig, defaulting to a single attempt. Only a request Steam never answered or a 5xx is retried, never a 4xx or SteamRateLimitException, because every attempt spends a slot of the daily budget (#62).
- SteamConnectionException for a request that never reached Steam — a timeout, a DNS failure, a TLS error, a refused connection. It carries no response and a 0 code, with Saloon's FatalRequestException on getPrevious() (#60).
- ApiKeyNotConfiguredException for a request that needs an API key sent from a config carrying none, and for a blank key handed to SteamConfig. Both are raised locally, so neither costs a round trip or a slot of the daily budget (#59).
Changed
- BC break. SteamConfig::$apiKey is a ?string defaulting to null, which makes GetNumberOfCurrentPlayersRequest and GetGlobalAchievementPercentagesForAppRequest reachable with no key configured. Callers reading the property as a string have to handle null (#59).
- BC break. Transport failures out of send(), sendAsync() and pool() surface as SteamConnectionException rather than Saloon's FatalRequestException. Callers catching the Saloon exception have to catch the SDK one instead (#60).
- A connector without an API key meters no daily budget, because Steam bills the 100 000 requests to the key; a 429 from Steam still raises SteamRateLimitException (#59).
- InvalidApiKeyException::missing() reads "Steam received no API key" rather than "Steam API key is missing" (#59).
- A status the SDK gives no meaning of its own raises the root SteamApiException with Saloon's RequestException on getPrevious(), which is what lets the retry loop see it (#62).
Details
- fix(config): make the Steam API key optional by @fkrzski in #68
- feat(exceptions): wrap transport failures by @fkrzski in #69
- feat(config): timeouts in SteamConfig by @fkrzski in #70
- Retry on transient failures by @fkrzski in #71
- UpToDateCheck (ISteamApps) by @fkrzski in #72
- GetServersAtAddress (ISteamApps) by @fkrzski in #73
- GetSDRConfig (ISteamApps) by @fkrzski in #74
- Docs pass and release prep for 0.7.0 by @fkrzski in #76