Skip to content

zeropingheroes/steam-apis

 
 

Repository files navigation

Steam APIs

PHP Version Laravel Version

Interface with Steam's APIs using PHP.

Forked with ❤️ from Astrotomic/steam-sdk.

Installation

composer require zeropingheroes/steam-apis

In your Laravel project's config/services.php add your Steam API key:

<?php

return [
    'steam' => [
        'api_key' => env('STEAM_API_KEY'),
        'rate_limit_store_path' => storage_path('app/steam-api'),
    ],
];

Usage example

use Zeropingheroes\SteamApis\SteamWebApiConnector\SteamWebApiConnector;
use Zeropingheroes\SteamApis\SteamCommunityApi\SteamCommunityApiConnector;
use Zeropingheroes\SteamApis\SteamStoreApi\SteamStoreApiConnector;

$steamWebApi = app(SteamWebApiConnector::class);
$playerSummary = $steamWebApi->getPlayerSummaries(steamids: [76561197960287930, 76561198061912622]);

$steamCommunityApi = app(SteamCommunityApiConnector::class);
$locations = $steamCommunityApi->queryLocations(countrycode: 'DE');

$steamStoreApi = app(SteamStoreApiConnector::class);
$appDetails = $steamStoreApi->appDetails(appid: 440);

Implemented requests

Steam API Steam Interface Class Method Connector Class
Web API ISteamApps getAppList() SteamWebApiConnector
Web API ISteamNews getNewsForApp() SteamWebApiConnector
Web API ISteamUser getFriendList() SteamWebApiConnector
Web API ISteamUser getPlayerBans() SteamWebApiConnector
Web API ISteamUser getPlayerSummaries() SteamWebApiConnector
Web API ISteamUser resolveVanityUrl() SteamWebApiConnector
Web API IPlayerService getRecentlyPlayedGames() SteamWebApiConnector
Web API IPlayerService getSteamLevel() SteamWebApiConnector
Web API ISteamUserStats getGlobalAchievementPercentagesForApp() SteamWebApiConnector
Web API ISteamWebAPIUtil getSupportedApiList() SteamWebApiConnector
Community API ? queryLocations() SteamCommunityApiConnector
Store API ? appDetails() SteamStoreApiConnector

For more information on Steam's APIs, see:

Contributing

Fork the repository, implement one feature or bugfix in a new branch and send a pull request.

Good examples of first contributions are implementing missing requests or fixing bugs.

This project uses Saloon to implement Steam API requests.

License

The MIT License (MIT). See License File for more information.

About

Interface with Steam's APIs using PHP

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • PHP 100.0%