2017 © Pedro Peláez
 

library steamapi

Steam Web Api Generic Integration

image

jocolopes/steamapi

Steam Web Api Generic Integration

  • Sunday, January 25, 2015
  • by DPr00f
  • Repository
  • 1 Watchers
  • 11 Stars
  • 1,339 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 4 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

wercker status, (*1)

About

PHP Wrapper to communicate with Steam Web API, (*2)

SteamID64 Finder

Please refer to http://steamid.co/ or http://steamidconverter.com/ to find the user steam id., (*3)

Install

Add to your composer.json, (*4)

{
    "require": {
        "jocolopes/steamapi": "dev-master"
    }
}

Usage

User Class

$user = new \SteamApi\User('YOUR-STEAM-KEY', 'THE-STEAMID64');

Get Player Bans

$user->GetPlayerBans();
// OR
$user->GetPlayerBans('THE-FIRST-STEAMID64,THE-SECOND-STEAMID64,THE-ANY-STEAMID64');

Get Player Summaries

$user->GetPlayerSummaries();
// OR
$user->GetPlayerSummaries('THE-FIRST-STEAMID64,THE-SECOND-STEAMID64,THE-ANY-STEAMID64');

Get Friend List

$user->GetFriendList();

Get UserGroup List

$user->GetUserGroupList();

ResolveVanityUrl

$user->ResolveVanityUrl('id-of-user-to-translate-into-steam-id');
// Example
$user->ResolveVanityUrl('pr00fgames'); // Result: 76561197963455129

Player Class

$player = new \SteamApi\Player('YOUR-STEAM-KEY', 'THE-STEAMID64');

Get Steam Level

$player->GetSteamLevel();

Get Player Level Details

$player->GetPlayerLevelDetails();

Get Badges

$player->GetBadges();

Get Community Badge Progress

$player->GetCommunityBadgeProgress();

Get Owned Games

$player->GetOwnedGames();

Get Recently Played Games

$player->GetRecentlyPlayedGames();

Is Playing Shared Game

$player->IsPlayingSharedGame($gameId);

News Class

$news = new \SteamApi\News('YOUR-STEAM-KEY');

Get News For App

$news->GetNewsForApp($appId[, $numberOfNews, $maxLength]); // Last 2 arguments are optional

App Class

$app = new \SteamApi\App('YOUR-STEAM-KEY');

Get App Details

$app->appDetails($appId);

Get Servers At Address

$app->GetServersAtAddress($address); // Hostname or IP:Port

Get App List

$app->GetAppList();

Check for up to date application

$app->UpToDateCheck($appId, $appVersion);

User Stats

$stats = new Stats('YOUR-STEAM-KEY', 'THE-STEAMID64');

Get Global Stats For Game

$stats->GetGlobalStatsForGame($gameId, array('STATS-NAME'));
// Example
$stats->GetGlobalStatsForGame(17740, array('global.map.emp_isle'));

Get Number Of Current Players

$stats->GetNumberOfCurrentPlayers($appId);

Get Schema For Game

$stats->GetSchemaForGame($appId);

Get Player Achievements

$stats->GetPlayerAchievements($appId);

Get Global Achievement Percentages For App

$stats->GetGlobalAchievementPercentagesForApp($appId);

Get User Stats Fo rGame

$stats->GetUserStatsForGame($appId);

More Info

Please Refer to the tests folder to get more information on how to use the library, (*5)

Objective

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)

FAQ

Do I need anything special to use this library?

You do need PHP 5.4+ and composer. You also need to load the vendor/autoload.php into your project., (*10)

Will this work on my framework?

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)

Found a bug, what should I do?

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)

The Versions

25/01 2015

dev-master

9999999-dev

Steam Web Api Generic Integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joao Lopes

library webapi steam steamapi jocolopes steamwebapi