steamutils 1.4.16 → 1.4.17
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +1 -1
- package/index.js +25 -4
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -1727,7 +1727,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
|
|
1727
1727
|
}
|
1728
1728
|
|
1729
1729
|
if (clientJsToken?.logged_in === true) {
|
1730
|
-
log(reconnect ? "reconnect with clientJsToken" : "login with clientJsToken");
|
1730
|
+
log(`[${clientJsToken.steamid}] ${reconnect ? "reconnect with clientJsToken" : "login with clientJsToken"}`);
|
1731
1731
|
setTimeout(function () {
|
1732
1732
|
clientJsToken = null;
|
1733
1733
|
}, 1000);
|
package/index.js
CHANGED
@@ -3359,7 +3359,7 @@ export default class SteamUser {
|
|
3359
3359
|
return groupList;
|
3360
3360
|
const resultExample = [
|
3361
3361
|
{
|
3362
|
-
id:
|
3362
|
+
id: "54645654",
|
3363
3363
|
avatarHash: "71213b7e643da6216b1f8d8a381fc09b7c1932ef",
|
3364
3364
|
avatar: "https://avatars.cloudflare.steamstatic.com/71213b7e643da6216b1f8d8a381fc09b7c1932ef.jpg",
|
3365
3365
|
name: "♔⌒Natri",
|
@@ -3408,7 +3408,7 @@ export default class SteamUser {
|
|
3408
3408
|
};
|
3409
3409
|
const successExample = {
|
3410
3410
|
results: "OK",
|
3411
|
-
groupId:
|
3411
|
+
groupId: "5464596",
|
3412
3412
|
};
|
3413
3413
|
}
|
3414
3414
|
|
@@ -6052,8 +6052,8 @@ export default class SteamUser {
|
|
6052
6052
|
}
|
6053
6053
|
const $ = cheerio.load(data);
|
6054
6054
|
const text = StringUtils.cleanSpace($(".help_event_limiteduser .help_event_limiteduser_spend").text());
|
6055
|
-
if (text?.startsWith("Amount Spent on Steam")) {
|
6056
|
-
return text;
|
6055
|
+
if (text?.startsWith("Amount Spent on Steam:")) {
|
6056
|
+
return text.replaceAll("Amount Spent on Steam:", "").trim(); //$0.00 / $5.00 USD
|
6057
6057
|
} else {
|
6058
6058
|
return null;
|
6059
6059
|
}
|
@@ -7300,6 +7300,27 @@ export default class SteamUser {
|
|
7300
7300
|
}
|
7301
7301
|
return tokens.some((token) => token.token_id == tokenId);
|
7302
7302
|
}
|
7303
|
+
|
7304
|
+
async enumerateTokenLastSeenMs(accessToken, platform_type) {
|
7305
|
+
const tokens = (await this.enumerateTokens(accessToken))?.response?.refresh_tokens;
|
7306
|
+
if (!Array.isArray(tokens) || !tokens.length) {
|
7307
|
+
return null;
|
7308
|
+
}
|
7309
|
+
const platformTypeToken = tokens.filter(function (token) {
|
7310
|
+
return token.platform_type === platform_type;
|
7311
|
+
});
|
7312
|
+
if (!platformTypeToken.length) {
|
7313
|
+
return 0;
|
7314
|
+
}
|
7315
|
+
return (
|
7316
|
+
Math.max(
|
7317
|
+
...platformTypeToken.map(function (token) {
|
7318
|
+
return token.last_seen?.time || token.first_seen?.time;
|
7319
|
+
}),
|
7320
|
+
) * 1000
|
7321
|
+
);
|
7322
|
+
}
|
7323
|
+
|
7303
7324
|
async queryRefreshTokenByID(accessToken, tokenId) {
|
7304
7325
|
const Protos = helpers([
|
7305
7326
|
{
|