PHP code example of squegtech / steam-api
1. Go to this page and download the library: Download squegtech/steam-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
squegtech / steam-api example snippets
uzzleHttp\Client;
use SquegTech\Steam\Command\Apps\GetAppList;
use SquegTech\Steam\Configuration;
use SquegTech\Steam\Runner\GuzzleRunner;
use SquegTech\Steam\Runner\DecodeJsonStringRunner;
use SquegTech\Steam\Steam;
use SquegTech\Steam\Utility\GuzzleUrlBuilder;
$steam = new Steam(new Configuration([
Configuration::STEAM_KEY => '<insert steam key here>'
]));
$steam->addRunner(new GuzzleRunner(new Client(), new GuzzleUrlBuilder()));
$steam->addRunner(new DecodeJsonStringRunner());
/** @var array $result */
$result = $steam->run(new GetAppList());
var_dump($result);
$steam = new Steam(new Configuration([
Configuration::STEAM_KEY => '<insert steam key here>'
]));