Module: SteamWebAPI

This module exports the API helper functions
Source:

Methods

(static) getFriendList(steamid, relationship, callback)

Get friend list Returns the friend list of any Steam user, provided his Steam Community profile visibility is set to "Public"
Parameters:
Name Type Description
steamid string 64 bit Steam ID to return friend list for
relationship string Relationship filter. Possibles values: all, friend
callback function Function to handle the response
Source:

(static) getGlobalAchievementPercentagesForApp(gameid, callback)

Get global achievement percentages for an app ID Returns on global achievements overview of a specific game in percentages
Parameters:
Name Type Description
gameid int AppID of the game you want the percentages of
callback function Function to handle the response
Source:

(static) getGlobalStatsForGame(gameid, count, name, callback)

Get global stats for game Get the global stats for the provided achievement names
Parameters:
Name Type Description
gameid int AppID of the game you want the stats of
count int Length of the array of global stat names you will be passing
name array Name of the achievement as defined in Steamworks
callback function Function to handle the response
Source:

(static) getNewsForApp(appid, count, maxLength, callback)

Get news for an app ID GetNewsForApp returns the latest of a game specified by its appID
Parameters:
Name Type Description
appid int AppID of the game you want the news of
count int How many news enties you want to get returned
maxLength int Maximum length of each news entry
callback function Function to handle the response
Source:

(static) getOwnedGames(steamid, include_appinfo, include_played_free_games, appids_filter, callback)

Get owned games GetOwnedGames returns a list of games a player owns along with some playtime information, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (ie the WebAPI key you are using is linked to the steamid you are requesting).
Parameters:
Name Type Description
steamid string The SteamID of the account
include_appinfo string Include game name and logo information in the output. The default is to return appids only
include_played_free_games boolean By default, free games like Team Fortress 2 are excluded (as technically everyone owns them). If include_played_free_games is set, they will be returned if the player has played them at some point. This is the same behavior as the games list on the Steam Community
appids_filter array You can optionally filter the list to a set of appids. Note that these cannot be passed as a URL parameter, instead you must use the JSON format described in Steam_Web_API#Calling_Service_interfaces. The expected input is an array of integers (in JSON: "appids_filter: [ 440, 500, 550 ] " )
callback function Function to handle the response
Source:

(static) getPlayerAchievements(steamid, appid, callback)

Get player achievements Returns a list of achievements for this user by app id
Parameters:
Name Type Description
steamid string 64 bit Steam ID to return friend list for
appid int The ID for the game you're requesting
callback function Function to handle the response
Source:

(static) getPlayerSummaries(steamids, callback)

Get player summaries Returns basic profile information for a list of 64-bit Steam IDs
Parameters:
Name Type Description
steamids string Comma-delimited list of 64 bit Steam IDs to return profile information for. Up to 100 Steam IDs can be requested
callback function Function to handle the response
Source:

(static) getRecentlyPlayedGames(steamid, count, callback)

Get recently played games GetRecentlyPlayedGames returns a list of games a player has played in the last two weeks, if the profile is publicly visible. Private, friends-only, and other privacy settings are not supported unless you are asking for your own personal details (ie the WebAPI key you are using is linked to the steamid you are requesting).
Parameters:
Name Type Description
steamid string The SteamID of the account
count int Optionally limit to a certain number of games (the number of games a person has played in the last 2 weeks is typically very small)
callback function Function to handle the response
Source:

(static) getUserStatsForGame(steamid, appid, callback)

Get user stats for game Returns a list of achievements for this user by app id
Parameters:
Name Type Description
steamid string 64 bit Steam ID to return friend list for
appid int The ID for the game you're requesting
callback function Function to handle the response
Source:

(static) isPlayingSharedGame(steamid, appid_playing, callback)

Is playing shared game IsPlayingSharedGame returns the original owner's SteamID if a borrowing account is currently playing this game. If the game is not borrowed or the borrower currently doesn't play this game, the result is always 0.
Parameters:
Name Type Description
steamid string The SteamID of the account playing
appid_playing int The AppID of the game currently playing
callback function Function to handle the response
Source:

(static) send(method, parameters, callback)

Send API request Send the specified request to the Steam Web API and execute the callback upon success or failure
Parameters:
Name Type Description
method string The method name on the Steam Web API
parameters object An object containing all the required parameters for the API request
callback function The function to call upon success or failure
Source:

(static) setAPIKey(newAPIKey) → {boolean}

Set API Key Sets the API key that will be used to validate the API requests
Parameters:
Name Type Description
newAPIKey string The new API key to use
Source:
Returns:
If this function successfully set the provided API key
Type
boolean

(static) setFormat(newFormat)

Set response format Sets the default response format for responses from the Steam Web API
Parameters:
Name Type Description
newFormat string The new preferred response format
Source: