You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{SteamMini}from"steam-mini-api";conststeam=newSteamMini("<YOUR-STEAM-API-KEY>");// Get info about a single steam user by their 64 bit steam idconstuser=awaitsteam.getUserInfo("<STEAM-USER-ID>");// Get the user's most recently played games (default return limit is 1)constrecentlyPlayed=awaitsteam.getRecentlyPlayedGames("<STEAM-USER-ID>",4);// Get topmost played games, sorted by playtimeconsttopGames=awaitsteam.getMostPlayed("<STEAM-USER-ID>",4,{includePlayedFreeGames: false,includeAppInfo: true,});
Methods
getUserInfo()聽聽聽Promise<Object>
Options
Type
Description
steamid
string
The 64 bit steam id of the player to get the info of.
getRecentlyPlayedGames()聽聽聽Promise<Array>
Options
Type
Description
steamid
string
The 64 bit steam id of the player to get the info of.
count
number
Count of recently played games to return. (Default: 3)
getMostPlayed()聽聽聽Promise<Array>
Options
Type
Description
steamid
string
The Steam User ID of the player to get the info of.
count
number (1 <= n <= 10)
Count of recently played games to return. (Default: 3)
options.includePlayedFreeGames
boolean
Include free games if the player has played them. (Default: false)
options.includeAppInfo
boolean
Include game name and logo information in the output. (Default: true)
License
Steam Mini is packaged and distributed using the MIT License which allows for commercial use, distribution, modification and private use provided that all copies of the software contain the same license and copyright.