Skip to main content
Module

x/steam_trader/src/steam_community.ts>SteamCommunity

https://deno.land/x/steam_trader
Latest
class SteamCommunity
import { SteamCommunity } from "https://deno.land/x/steam_trader@v0.4.0/src/steam_community.ts";

Constructors

new
SteamCommunity(options: SteamCommunityOptions)

Properties

private
lastLoginAttempt: LoginAttemptData
private
loadCookies
private
loadedCookies: boolean
private
loggingIn: boolean
private
manager: TradeManager
private
saveCookies
private
sharedSecret: SteamCommunityOptions["sharedSecret"] | undefined
confirmationService: ConfirmationService
cookieJar: CookieJar
fetch
languageName: string
password: string | undefined
steamID: SteamID | undefined
username: string | undefined

Methods

private
fetchUserInventoryPage(options: { userID: SteamID; appID: number; contextID: string; startAssetId?: string; tradableOnly?: boolean; }): Promise<{ currency: EconItem[]; inventory: EconItem[]; totalInventoryCount: number; moreItems: boolean; lastAssetId: undefined | string; }>
private
setCookie(cookie: Cookie)
getLoginStatus(): Promise<{ isLoggedIn: boolean; isFamilyLockActive: boolean | undefined; error?: Error; }>
getSessionID(): string
getUserInventoryContents(options: { userID: SteamID | string; appID: number; contextID: string; tradableOnly?: boolean; })

totalInventoryCount may not be equal to sum of currency and inventory lengths if inventory changes mid request.

getWebApiKey(domain: string): Promise<string>
login(options?: LoginOptions)

Only automatic totp generation with sharedSecret is supported. Make sure your system time is in sync with world.

after successful login these cookies should be set at least: sessionid, steamLoginSecure, steamMachineAuth

parentalUnlock(pin: string): Promise<boolean>
setLoginDefaults(options: Pick<LoginOptions, "username" | "password" | "sharedSecret">)