GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TeemoCell/SteamWebAPI: A composer package to make use of the steam web api.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

230 Commits
230 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docker/php/8.4
docker/php/8.4
 
 
examples
examples
 
 
src
src
 
 
tests
tests
 
 
.env.example
.env.example
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
composer.lock
composer.lock
 
 
docker-compose.yml
docker-compose.yml
 
 
phpunit.xml
phpunit.xml
 
 
rector.php
rector.php
 
 

Repository files navigation

Steam Web API

Unit Tests Latest Stable Version Total Downloads License

A modern PHP client for the Steam Web API with optional Laravel integration.

Requirements

  • PHP 8.2 or newer
  • Laravel 12.61.1 or newer, or Laravel 13.12.0 or newer, when used inside Laravel
  • A Steam Web API key

Installation

composer require teemocell/steam-web-api

Quick start

use TeemoCell\SteamWebApi\Client;

$steam = new Client(apiKey: $_ENV['STEAM_API_KEY']);

$player = $steam
    ->user(76561197960287930)
    ->GetPlayerSummaries()[0];

echo $player->personaName;

The package uses the TeemoCell\SteamWebApi PHP namespace.

Laravel

Add the API key to .env:

STEAM_API_KEY=your-key-here

The package registers TeemoCell\SteamWebApi\Client as a singleton through Laravel package discovery:

use TeemoCell\SteamWebApi\Client;

final class SteamProfileController
{
    public function __invoke(Client $steam, string $steamId)
    {
        return $steam->user($steamId)->GetPlayerSummaries();
    }
}

Publish the configuration only when it needs to be customized:

php artisan vendor:publish --provider="TeemoCell\SteamWebApi\SteamApiServiceProvider"

Supported services

  • ISteamNews
  • IPlayerService
  • ISteamUser
  • ISteamUserStats
  • IStoreService
  • IPublishedFileService
  • ISteamWebAPIUtil
  • read-only IGameServersService
  • publisher-key methods for ISteamUser, ISteamNews and IInventoryService
  • experimental public Steam Community inventories

Legacy Store and Steam Community endpoints remain available for backwards compatibility.

Public Community inventories include assets, names, descriptions, images and market metadata. Steam does not officially document this Community endpoint, so the client is explicitly experimental:

$inventory = $steam->communityInventory()->GetInventory(
    steamId: $steamId,
    appId: 730,
    contextId: 2,
);

Publisher keys can use the official inventory service for their own apps:

$publisher = (new Client(apiKey: $publisherKey))->publisher();
$items = $publisher->GetInventory($appId, $steamId);
$definitions = $publisher->GetItemDefs($appId);
$prices = $publisher->GetPriceSheet($currency);

GetPriceSheet() returns Inventory Service store prices, not Community Market resale prices.

Documentation

Full installation, configuration, endpoint and migration documentation is available in the GitHub Wiki:

  • Installation
  • Configuration
  • Laravel integration
  • Client usage
  • Endpoint reference
  • Community inventories
  • Error handling
  • Migration guide

Testing

Run the deterministic offline suite:

php vendor/bin/phpunit --filter "AppListTest|ClientConstructionTest|CommunityInventoryTest|CurrentApiEndpointsTest|UserStatsResponseTest|LaravelClientBindingTest"

The complete suite contains live Steam API tests and requires STEAM_API_KEY.

Security

Never expose normal API keys, publisher keys or game-server login tokens in client-side code, logs, issues or committed files. Publisher methods must only run on a trusted server.

Contributing

Bug reports and pull requests are welcome through the GitHub issue tracker.

Contributors

  • Stygiansabyss
  • nicekiwi
  • rannmann
  • Amegatron
  • mjmarianetti
  • MaartenStaa
  • JRizzle88
  • jastend
  • Teakowa
  • Ben Sherred

License

This package is open-source software licensed under the MIT License.

About

A composer package to make use of the steam web api.

packagist.org/packages/teemocell/steam-web-api

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.