/**
  *  Gets prices of items in the economy.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/GetAssetPrices] [GetAssetPrices]
  *  @param $appId [Application ID for the game]
  *  @param $language [Language for the response, default value is 'en']
  *  @param $currency [code for currency default one is 'USD']
  *  @return $response 
  *
  */
 public static function getAssetPrices($appId, $language = 'en', $currency = 'USD')
 {
     $params = SteamApiUtil::formGETParameters(array('appid' => $appId, 'language' => $language, 'currency' => $currency, 'key' => parent::getConfiguration()->getApiKey(), 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::ISteamEconomy;
     $endpoint = ApiMethods::getEndpointUrl($module, 'GetAssetPrices');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
 /**
  *  Lists all available WebAPI interfaces.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/GetSupportedAPIList] [GetSupportedAPIList]
  *  @param $key [API Key value]
  *  @return $response 
  *
  */
 public static function getSupportedAPIList($key)
 {
     $params = SteamApiUtil::formGETParameters(array('key' => $key, 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::ISteamWebAPIUtil;
     $endpoint = ApiMethods::getEndpointUrl($module, 'GetSupportedAPIList');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
 /**
  *  Gets news feed for various games.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/GetUGCFileDetails] [GetUGCFileDetails]
  *  @param $steamId [Steam ID of the user]
  *  @param $ugcId [ID of UGC file to get info for]
  *  @param $appId [Application ID for the game]
  *  @return $response 
  *
  */
 public static function getUGCFileDetails($steamId, $ugcId, $appId)
 {
     $params = SteamApiUtil::formGETParameters(array('steamid' => $steamId, 'ugcid' => $ugcId, 'appid' => $appId, 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::ISteamRemoteStorage;
     $endpoint = ApiMethods::getEndpointUrl($module, 'GetUGCFileDetails');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
Example #4
0
 /**
  * Checks if a given app version is the most current available.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/UpToDateCheck] [UpToDateCheck]
  *  @param $appId [Application ID for the game]
  *  @param $version [current version]
  *  @return $response 
  *
  */
 public static function upToDateCheck($appId, $version)
 {
     $params = SteamApiUtil::formGETParameters(array('appid' => $appId, 'version' => $version, 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::ISteamApps;
     $endpoint = ApiMethods::getEndpointUrl($module, 'UpToDateCheck');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
Example #5
0
 /**
  *  Gets news feed for various games.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/GetNewsForApp] [GetNewsForApp]
  *  @param $appId [Application ID for the game]
  *  @param $count [max number of news to be fetched]
  *  @param $maxlength [max length of the contents field]
  *  @param $endDate [Unix timestamp, returns posts before this date]
  *  @param $feeds [Commma-seperated list of feed names to return news for]
  *  @return $response 
  *
  */
 public static function getNewsForApp($appid, $count = 20, $maxlength = '', $endDate = '', $feeds = [])
 {
     $parameters = array('appid' => $appid, 'count' => $count, 'maxlength' => $maxlength, 'enddate' => $endDate, 'format' => parent::getConfiguration()->getResponseFormat());
     for ($i = 0; $i < sizeof($feeds); $i++) {
         $parameters["feeds" . $i] = $feeds[$i];
     }
     $params = SteamApiUtil::formGETParameters($parameters);
     $module = ApiModules::ISteamNews;
     $endpoint = ApiMethods::getEndpointUrl($module, 'GetNewsForApp');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
 /**
  *  Gets information about community badge progress with given user and badge id.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/GetCommunityBadgeProgress] [GetCommunityBadgeProgress]
  *  @param $steamId [Steam ID of the user]
  *  @param $badgeId [Badge ID]
  *  @return $response 
  *
  */
 public static function getCommunityBadgeProgress($steamId, $badgeId)
 {
     $params = SteamApiUtil::formGETParameters(array('steamid' => $steamId, 'badgeid' => $badgeId, 'key' => parent::getConfiguration()->getApiKey(), 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::IPlayerService;
     $endpoint = ApiMethods::getEndpointUrl($module, 'GetCommunityBadgeProgress');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
Example #7
0
 /**
  * Resolves vanity URL parts to a 64 bit ID.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/ResolveVanityURL] [ResolveVanityURL]
  *  @param $vanityurl [The user's vanity URL that you would like to retrieve a steam ID]
  *  @return $response 
  *
  */
 public static function resolveVanityURL($vanityurl)
 {
     $params = SteamApiUtil::formGETParameters(array('key' => parent::getConfiguration()->getApiKey(), 'vanityurl' => $vanityurl, 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::ISteamUser;
     $endpoint = ApiMethods::getEndpointUrl($module, 'ResolveVanityURL');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }
 /**
  *  Gets user statistics for the given game list of the user.
  *  @link [https://wiki.teamfortress.com/wiki/WebAPI/GetUserStatsForGame] [GetUserStatsForGame]
  *  @param $steamId [Steam ID of the user]
  *  @param $appId [Application ID of the game]
  *  @return $response 
  *
  */
 public static function getUserStatsForGame($steamId, $appId)
 {
     $params = SteamApiUtil::formGETParameters(array('steamid' => $steamId, 'appid' => $appId, 'key' => parent::getConfiguration()->getApiKey(), 'format' => parent::getConfiguration()->getResponseFormat()));
     $module = ApiModules::ISteamUserStats;
     $endpoint = ApiMethods::getEndpointUrl($module, 'GetUserStatsForGame');
     $url = SteamApiUtil::formUrl($module, $endpoint);
     return parent::sendRequest(HTTPMethod::GET, $url, $params);
 }