dev-master
9999999-devSteam Web Api Generic Integration
MIT
The Requires
The Development Requires
by Joao Lopes
library webapi steam steamapi jocolopes steamwebapi
Wallogit.com
2017 © Pedro Peláez
Steam Web Api Generic Integration
PHP Wrapper to communicate with Steam Web API, (*2)
Please refer to http://steamid.co/ or http://steamidconverter.com/ to find the user steam id., (*3)
Add to your composer.json, (*4)
{
"require": {
"jocolopes/steamapi": "dev-master"
}
}
$user = new \SteamApi\User('YOUR-STEAM-KEY', 'THE-STEAMID64');
$user->GetPlayerBans();
// OR
$user->GetPlayerBans('THE-FIRST-STEAMID64,THE-SECOND-STEAMID64,THE-ANY-STEAMID64');
$user->GetPlayerSummaries();
// OR
$user->GetPlayerSummaries('THE-FIRST-STEAMID64,THE-SECOND-STEAMID64,THE-ANY-STEAMID64');
$user->GetFriendList();
$user->GetUserGroupList();
$user->ResolveVanityUrl('id-of-user-to-translate-into-steam-id');
// Example
$user->ResolveVanityUrl('pr00fgames'); // Result: 76561197963455129
$player = new \SteamApi\Player('YOUR-STEAM-KEY', 'THE-STEAMID64');
$player->GetSteamLevel();
$player->GetPlayerLevelDetails();
$player->GetBadges();
$player->GetCommunityBadgeProgress();
$player->GetOwnedGames();
$player->GetRecentlyPlayedGames();
$player->IsPlayingSharedGame($gameId);
$news = new \SteamApi\News('YOUR-STEAM-KEY');
$news->GetNewsForApp($appId[, $numberOfNews, $maxLength]); // Last 2 arguments are optional
$app = new \SteamApi\App('YOUR-STEAM-KEY');
$app->appDetails($appId);
$app->GetServersAtAddress($address); // Hostname or IP:Port
$app->GetAppList();
$app->UpToDateCheck($appId, $appVersion);
$stats = new Stats('YOUR-STEAM-KEY', 'THE-STEAMID64');
$stats->GetGlobalStatsForGame($gameId, array('STATS-NAME'));
// Example
$stats->GetGlobalStatsForGame(17740, array('global.map.emp_isle'));
$stats->GetNumberOfCurrentPlayers($appId);
$stats->GetSchemaForGame($appId);
$stats->GetPlayerAchievements($appId);
$stats->GetGlobalAchievementPercentagesForApp($appId);
$stats->GetUserStatsForGame($appId);
Please Refer to the tests folder to get more information on how to use the library, (*5)
The objective of this library is to wrap the steam web API into a php object., (*6)
There are some missing methods that I plan to implement soon., (*7)
Feel free to add some missing methods and as for a pull request on this repo., (*8)
The missing methods can be found using the swissapiknife., (*9)
You do need PHP 5.4+ and composer. You also need to load the vendor/autoload.php into your project., (*10)
This library is framework agnostic, maybe the framework you're using requires some aditional setup., (*11)
If your framework uses composer you should be good to go. But let me know if you run into any troubles., (*12)
If you have the capacity to fix it yourself by all means do and create a pull request., (*13)
If you don't, raise an issue on github and me or someone else will try to fix it., (*14)
Steam Web Api Generic Integration
MIT
library webapi steam steamapi jocolopes steamwebapi