PHP code example of syntax / steam-api

1. Go to this page and download the library: Download syntax/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/ */

    

syntax / steam-api example snippets


use Syntax\SteamApi\Facades\SteamApi;

/** Get Portal 2 */
$apps = SteamApi::app()->appDetails(620);

echo $app->first()->name;

SteamApi::convertId($id, $format);

SteamApi::news()


	$news = SteamApi::news()->GetNewsForApp($appId, 5, 500)->newsitems;

SteamApi::player($steamId)

SteamApi::user($steamId)

	$player = SteamApi::user($steamId)->ResolveVanityURL('gabelogannewell');

	// One user
	$steamId = 76561197960287930;
	$player = SteamApi::user($steamId)->GetPlayerSummaries()[0];
	
	// Several users
	$steamIds = [76561197960287930, 76561197968575517]
	$players = SteamApi::user($steamIds)->GetPlayerSummaries();

SteamApi::userStats($steamId)

SteamApi::app()

SteamApi::package()

SteamApi::item()

SteamApi::group()


	$news = SteamApi::group()->GetGroupSummary('Valve');