Skip to content

Response Models

TeemoCell edited this page Jul 20, 2026 · 3 revisions

Response Models

The package returns typed containers where a stable application-facing representation is useful. Other methods expose Steam's decoded response object directly.

Typed containers

Container Used by
Containers\Player Player summaries and enriched friend lists.
Containers\Id Normalized Steam ID representations.
Containers\Game Owned and recently played games.
Containers\Player\Level Level and XP details.
Containers\Achievement User and global achievements.
Containers\App Legacy Store app details.
Containers\Package Legacy Store package details.
Containers\Group Steam Community group details.
Containers\Item Legacy inventory items.
Containers\CommunityInventoryItem Public Community assets enriched with descriptions and image URLs.
Inventory Inventory size and item collection.
CommunityInventoryResult Paginated Community inventory items, total count and page count.

Collections

Several methods return Laravel Collection instances even when used outside a full Laravel application because illuminate/support is provided by the Laravel framework dependency.

$games = $steam->player($steamId)->GetOwnedGames();

foreach ($games as $game) {
    echo $game->name.PHP_EOL;
}

Raw decoded responses

Service-oriented clients such as Workshop, Web API utilities, game servers and publisher APIs return decoded response objects. Steam controls their nested fields.

$response = $steam->webApi()->GetSupportedAPIList();

Check fields before accessing optional values:

$interfaces = $response->apilist->interfaces ?? [];

Stability guidance

  • Treat documented method return types as the package contract.
  • Treat optional Steam response properties as nullable or absent.
  • Avoid serializing complete raw responses as a permanent database schema.
  • Map data into application-owned DTOs when long-term stability matters.
  • Account for profile privacy and endpoint permissions before assuming an empty list means “none”.

Clone this wiki locally