Skip to content

0.9.0

Latest

Choose a tag to compare

@fkrzski fkrzski released this 09 Oct 20:50
· 7 commits to master since this release
Immutable release. Only release title and notes can be modified.
d4d5238

Adds ISteamWebAPIUtil (GetServerInfo, GetSupportedAPIList), any Saloon sender in place of Guzzle, and configurable rate limits and 429 cool-down, and resets the daily budget at midnight UTC. Contains a breaking change.

Added

  • GetServerInfoRequest (ISteamWebAPIUtil), returning Steam's clock as a DateTimeImmutable in UTC, reached anonymously through the new WebApiResource as $connector->webApi()->serverTime() (#98).
  • GetSupportedApiListRequest (ISteamWebAPIUtil) with the WebApiInterface, WebApiMethod and WebApiParameter DTOs, listing every Web API method Steam lets the caller see as $connector->webApi()->supportedApis(). It implements the new SendsOptionalApiKey contract, so the configured key goes along and adds the methods it can call, a connector without one gets the anonymous list, and a rejected key raises InvalidApiKeyException (#99).
  • rateLimits on SteamConfig, a list of the rate limit plugin's Limits that replaces the daily budget of 100 000, with a key or without; [] meters nothing locally, and a 429 from Steam still raises SteamRateLimitException. Two limits sharing a name throw the new InvalidRateLimitException as the config is built (#101).
  • sender on SteamConfig, any Saloon Sender in place of the default GuzzleSender. Whatever is injected, a request Steam never answered, a PSR-18 network exception included, raises SteamConnectionException and is retried (#102).
  • tooManyRequestsCooldown on SteamConfig, the seconds a 429 without Retry-After refuses requests locally, 60 by default, with a key or without and whatever rateLimits is. A Retry-After from Steam still wins, and a value under 1 throws InvalidRateLimitException as the config is built (#117).

Changed

  • BC break. SteamConnector::sender() returns SteamSender, which wraps the sender in use, instead of a GuzzleSender, so addMiddleware(), getHandlerStack() and getGuzzleClient() are gone from it. Callers that need Guzzle pass a GuzzleSender of their own as sender (#102).
  • GitHub Actions are pinned to full commit SHAs with the version in a trailing comment, and the docs workflow runs @fkrzski/docs-schema 0.1.0 instead of the latest release (#103).

Fixed

  • The daily budget resets at 00:00 UTC instead of 24 hours after the first request of its window. The limit is now named 100000_every_utc_midnight, so counters already held in a persistent store restart from zero once (#100).
  • PlayerSummary maps the communityvisibilitystate 2 that Steam returns for friends-only profiles to the new CommunityVisibility::FriendsOnly, where it threw UnexpectedValueException and failed the whole GetPlayerSummariesRequest batch (#106).

Details