steamapi / default
Defined in: SteamAPI.ts:168
new default(
key,options):SteamAPI
Defined in: SteamAPI.ts:196
Make a new SteamAPI Client
Key to use for API calls. Key can be generated at https://steamcommunity.com/dev/apikey. If you want to make requests without a key, pass in false
string | false
SteamAPIOptions = {}
Custom options for default language, HTTP parameters, and caching
SteamAPI
baseActions:
string
Defined in: SteamAPI.ts:184
baseAPI:
string
Defined in: SteamAPI.ts:182
baseStore:
string
Defined in: SteamAPI.ts:183
currency:
Currency
Defined in: SteamAPI.ts:180
optionalgameDetailCache:CacheMap<string,GameDetails>
Defined in: SteamAPI.ts:186
headers:
object
Defined in: SteamAPI.ts:181
[key: string]: string
language:
Language
Defined in: SteamAPI.ts:179
optionaluserResolveCache:CacheMap<string,string>
Defined in: SteamAPI.ts:187
staticreCommunityID:RegExp
Defined in: SteamAPI.ts:170
staticreProfileBase:string
Defined in: SteamAPI.ts:169
staticreProfileURL:RegExp
Defined in: SteamAPI.ts:173
staticreSteamID2:RegExp
Defined in: SteamAPI.ts:171
staticreSteamID3:RegExp
Defined in: SteamAPI.ts:172
staticreVanityID:RegExp
Defined in: SteamAPI.ts:175
staticreVanityURL:RegExp
Defined in: SteamAPI.ts:174
staticSUCCESS_CODE:number=1
Defined in: SteamAPI.ts:177
get(
path,params,base):Promise<any>
Defined in: SteamAPI.ts:233
Used to make any GET request to the Steam API
string
Path to request e.g '/IPlayerService/GetOwnedGames/v1?steamid=76561198378422474'
ParsedUrlQueryInput = {}
string = ...
Base API URL
Promise<any>
Parse JSON
getAppList():
Promise<AppBase[]>
Defined in: SteamAPI.ts:415
Get every single app on steam
Note: Original JSON names are being preserved instead of converting each element to a class here because there are 186311+ games that would have to be made into a class.
Promise<AppBase[]>
Array of very basic app info (ID + name)
getCities(
countryCode,stateCode):Promise<City[]>
Defined in: SteamAPI.ts:718
Gets all the cities for a particular state
string
string
Promise<City[]>
Array of city objects with fields countrycode, statecode, cityname and cityid
getCountries():
Promise<Country[]>
Defined in: SteamAPI.ts:702
Gets all the countries
Promise<Country[]>
Array of country objects with fields countrycode, hasstates, and countryname
getFeaturedCategories(
options):Promise<{[key:string]:any; }>
Defined in: SteamAPI.ts:316
Gets featured categories on Steam store
undocumented endpoint -- may be unstable
More options
Currency = ...
The currency
Language = ...
The language
Promise<{[key: string]: any; }>
getFeaturedGames(
options):Promise<{[key:string]:any; }>
Defined in: SteamAPI.ts:329
Gets featured games on Steam store
undocumented endpoint -- may be unstable
More options
Currency = ...
The currency
Language = ...
The language
Promise<{[key: string]: any; }>
getGameAchievementPercentages(
app):Promise<AchievementPercentage[]>
Defined in: SteamAPI.ts:485
Get achievement percentages for app ID
If a game does not have any achievements, this will error
number
App ID to get achievement progress for
Promise<AchievementPercentage[]>
Array of object with achievement name and percentage for app ID
getGameDetails(
app,options?):Promise<GameDetails>
Defined in: SteamAPI.ts:354
Get details for app ID. If an array of more than one app ID is passed in, the parameter &filters=price_overview will be added to the request since otherwise the server would respond with null
Note: a game will not have a price_overview field if it is F2P
If the array contains invalid app IDs, they will be filtered out
Requests for this endpoint are limited to 200 every 5 minutes
Not every currency is supported. Only the following are valid: us, ca, cc, es, de, fr, ru, nz, au, uk.
Not every language is supported. A list of available languages can be found here.
Number
App ID or array of App IDs
More options
The currency
string[]
Fields to restrict the return results to
The language
Promise<GameDetails>
If app is number, returns single object. If app is array, returns a mapping of app IDs to objects
getGameDetails<
T>(app,options?):Promise<{[key:string]:GameDetails; }>
Defined in: SteamAPI.ts:355
Get details for app ID. If an array of more than one app ID is passed in, the parameter &filters=price_overview will be added to the request since otherwise the server would respond with null
Note: a game will not have a price_overview field if it is F2P
If the array contains invalid app IDs, they will be filtered out
Requests for this endpoint are limited to 200 every 5 minutes
Not every currency is supported. Only the following are valid: us, ca, cc, es, de, fr, ru, nz, au, uk.
Not every language is supported. A list of available languages can be found here.
T extends number
T[]
App ID or array of App IDs
More options
The currency
string[]
Fields to restrict the return results to
The language
Promise<{[key: string]: GameDetails; }>
If app is number, returns single object. If app is array, returns a mapping of app IDs to objects
getGameNews(
app,options):Promise<NewsPost[]>
Defined in: SteamAPI.ts:511
Get news for app ID
number
App ID
GetGameNewsOptions = {}
Additional options for filtering posts
Promise<NewsPost[]>
App news for ID
getGamePlayers(
app):Promise<number>
Defined in: SteamAPI.ts:438
Get number of current players for app ID
number
App ID to get number of current players for
Promise<number>
Number of current players
getGameSchema(
app,language):Promise<GameSchema>
Defined in: SteamAPI.ts:454
Get schema for app ID
number
App ID to get schema for
Language = ...
Language to return strings for (note: does not seem to affect stats; only achievements)
Promise<GameSchema>
Schema
getServerList(
filter,limit):Promise<GameServer[]>
Defined in: SteamAPI.ts:728
Gets servers using Master Server Query Protocol filtering
string = ''
Filter as defined by the Master Server Query Protocol. Although a filter is not strictly required, you probably want to at least use something like \appid[appid] to filter by app
number = 100
Number of results to return. 100 by default
Promise<GameServer[]>
getServers(
host):Promise<Server[]>
Defined in: SteamAPI.ts:425
Get every server associated with a particular host
string
Host to query (IPv4 or IPv4:queryport)
Promise<Server[]>
Info of servers
getServerTime():
Promise<Date>
Defined in: SteamAPI.ts:693
Gets the Steam server's time
Promise<Date>
Date object from the server
getStates(
countryCode):Promise<State[]>
Defined in: SteamAPI.ts:710
Gets all the states for a particular country
string
Promise<State[]>
Array of state objects with fields countrycode, statecode, and statename
getUserAchievements(
id,app,language):Promise<UserAchievements>
Defined in: SteamAPI.ts:467
Get a user's achievements for app ID
string
Steam ID of user
number
App ID to get achievements for
Language = ...
Language to return strings for
Promise<UserAchievements>
Achievements
getUserBadges(
id):Promise<UserBadges>
Defined in: SteamAPI.ts:536
Get a user's badges
string
User ID
Promise<UserBadges>
User level info and badges
getUserBans(
id):Promise<UserBans>
Defined in: SteamAPI.ts:622
Get a user's or multiple users' bans. If an array of IDs is passed in, this returns an array of UserBans
string
User ID(s)
Promise<UserBans>
Ban info
getUserBans(
id):Promise<UserBans[]>
Defined in: SteamAPI.ts:623
Get a user's or multiple users' bans. If an array of IDs is passed in, this returns an array of UserBans
string[]
User ID(s)
Promise<UserBans[]>
Ban info
getUserFriends(
id):Promise<UserFriend[]>
Defined in: SteamAPI.ts:641
Get a user's friends
string
User ID
Promise<UserFriend[]>
The provided user's friends
getUserGroups(
id):Promise<string[]>
Defined in: SteamAPI.ts:653
Get the groups the user is a member of
string
User ID
Promise<string[]>
Group IDs
getUserLevel(
id):Promise<undefined|number>
Defined in: SteamAPI.ts:547
Get a user's level
string
User ID
Promise<undefined | number>
The user's Steam level, or undefined if the profile is private
getUserOwnedGames(
id,opts):Promise<UserPlaytime<Game|GameInfo|GameInfoExtended>[]>
Defined in: SteamAPI.ts:559
Get users owned games.
string
User ID
Additional options for filtering
Promise<UserPlaytime<Game | GameInfo | GameInfoExtended>[]>
Owned games
getUserRecentGames(
id,count):Promise<UserPlaytime<GameInfoBasic>[]>
Defined in: SteamAPI.ts:609
Get a user's recently played games. Note: .game is GameInfo not just Game
Like getUserOwnedGames() but only returns games played in the last 2 weeks
string
User ID
number = 0
Number of results to limit the request to (0 means no limit)
Promise<UserPlaytime<GameInfoBasic>[]>
Recently played games and their play times
getUserServers():
Promise<UserServers>
Defined in: SteamAPI.ts:666
Gets servers on steamcommunity.com/dev/managegameservers using your key
Promise<UserServers>
Your server
getUserStats(
id,app):Promise<UserStats>
Defined in: SteamAPI.ts:498
Get a user's stats for app ID
string
Steam ID of user
number
App ID to get user stats for
Promise<UserStats>
Stats for app ID
getUserSummary(
id):Promise<UserSummary>
Defined in: SteamAPI.ts:675
Get users summary. If an array of IDs is passed in, this returns an array of UserSummary
string
User ID(s)
Promise<UserSummary>
Summary
getUserSummary(
id):Promise<UserSummary[]>
Defined in: SteamAPI.ts:676
Get users summary. If an array of IDs is passed in, this returns an array of UserSummary
string[]
User ID(s)
Promise<UserSummary[]>
Summary
resolve(
query):Promise<string>
Defined in: SteamAPI.ts:245
Resolve runs through a couple different methods for finding a user's profile ID based on either their id, username, profile url, vanity url, steamID2, or steamID3. Rejects promise if a profile couldn't be resolved
string
Something to resolve like https://steamcommunity.com/id/xDim
Promise<string>
Profile ID