PHP wrapper for the steam web API

Installs: 327

Dependents: 0

Stars: 25

Watchers: 4

Forks: 5

Open Issues: 1

Language: PHP

2.0.0 2015-05-27 01:28 UTC


Build Status

A PHP wrapper for the Steam API

It would be great to hear from people that are actively using this. Here is a link to Gitter https://gitter.im/DaMitchell/steam-api-php.

This is v2 of the library and it is pretty much a rewirte that makes it more flexible. It will allow you to do whatever you want to the response whether that is to get an array of map the response onto an object.


Install the latest version using Composer by running composer require da-mitchell/steam-api



use GuzzleHttp\Client;
use Steam\Configuration;
use Steam\Runner\GuzzleRunner;
use Steam\Steam;
use Steam\Utility\GuzzleUrlBuilder;

$steam = new Steam(new Configuration());
$steam->addRunner(new GuzzleRunner(new Client(), new GuzzleUrlBuilder()));

/** @var \GuzzleHttp\Message\FutureResponse $result */
$result = $steam->run(new \Steam\Command\Apps\GetAppList());

$appList = [];

$result->then(function(\GuzzleHttp\Message\Response $response){


The configuration object has now has 1 option from the 3 that were in v1:


Commands are the essentially classes that describe each endpoint. Each command implements Steam\Command\CommandInterface and has methods that will give the runners its interface, method, version, HTTP method and any params the endpoint requires.

I have implemented all commands for all the of the GET endpoints. Im not really sure which POST ones to implements since I am not really sure how some of them work. So if anyone understands them please implement them and put in a PR and I will add them in..


So runners are pretty simple objects, they implement Steam\Runner\RunnerInterface which has 3 methods, the most important being run. They other 2 are for setting the config object,

The run method has 2 arguments, $command and $result. Obviously $command is the endpoint you request on and $result is the result of the previous runner. This means that the $result of the first runner attached will be null.


Run the tests from the project root with php vendor/bin/phpunit