Skip to content

A strongly typed PHP client for accessing the Steam API

License

Notifications You must be signed in to change notification settings

vinevax/steam-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steam PHP API

License Latest Version on Packagist Total Downloads

Installation

composer require "vinevax/steam-php-api"

Usage

First create a new instance of VineVax\SteamPHPApi\SteamClient with your API key. You can get your API key from here.

use VineVax\SteamPHPApi\SteamClient;

$steam = new SteamClient('YOUR_API_KEY');

Available methods

Get game news

$steam->getNewsForApp(appId: 440, count: 3, maxlength: 300);

Get global achievements overview

$steam->getGlobalAchievementPercentagesForApp(appId: 440);

Get player summaries (accepts 1 steamid or an array of steamids)

$steam->getPlayerSummaries(steamIds: 76561197960435530);
$steam->getPlayerSummaries(steamIds: [76561197960435530, 76561197960435531]);

Get player friend list

$steam->getFriendList(steamId: 76561197960435530, relationship: 'friend');

Get player achievements

$steam->getPlayerAchievements(steamId: 76561197960435530, appId: 440, language: \VineVax\SteamPHPApi\Enums\Language::ENGLISH);

Get player stats for game

$steam->getPlayerStatsForGame(steamId: 76561197960435530, appId: 440, language: \VineVax\SteamPHPApi\Enums\Language::ENGLISH);

Get owned games

$steam->getOwnedGames(steamId: 76561197960435530, includeAppInfo: true, includeFreeGames: true);

Get recently played games

$steam->getRecentlyPlayedGames(steamId: 76561197960435530, count: 15);

About

A strongly typed PHP client for accessing the Steam API

Resources

License

Stars

Watchers

Forks

Languages