steamutils 1.5.47 → 1.5.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +30 -0
- package/package.json +1 -1
- package/parse_html.js +1 -1
package/index.js
CHANGED
@@ -8549,6 +8549,36 @@ export default class SteamUser {
|
|
8549
8549
|
/* empty */
|
8550
8550
|
}
|
8551
8551
|
}
|
8552
|
+
|
8553
|
+
/**
|
8554
|
+
* Retrieves the Steam Connection Manager (CM) server list by querying the Steam WebAPI.
|
8555
|
+
* Returns the `response` property from the API, which includes an array of connection manager servers,
|
8556
|
+
* as well as a status and message.
|
8557
|
+
*
|
8558
|
+
* @returns {Promise<undefined | {
|
8559
|
+
* serverlist: Array<{
|
8560
|
+
* endpoint: string,
|
8561
|
+
* legacy_endpoint: string,
|
8562
|
+
* type: string,
|
8563
|
+
* dc: string,
|
8564
|
+
* realm: string,
|
8565
|
+
* load: number,
|
8566
|
+
* wtd_load: number
|
8567
|
+
* }>,
|
8568
|
+
* success: boolean,
|
8569
|
+
* message: string
|
8570
|
+
* }>} The CM server list response, or undefined if the request failed.
|
8571
|
+
*/
|
8572
|
+
static async getCMListForConnect() {
|
8573
|
+
let response = null;
|
8574
|
+
try {
|
8575
|
+
response = (await axios.get("https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v1/")).data;
|
8576
|
+
} catch (e) {}
|
8577
|
+
if (!response) {
|
8578
|
+
return;
|
8579
|
+
}
|
8580
|
+
return response?.response;
|
8581
|
+
}
|
8552
8582
|
}
|
8553
8583
|
|
8554
8584
|
SteamUser.MAX_RETRY = 10;
|
package/package.json
CHANGED
package/parse_html.js
CHANGED
@@ -150,7 +150,7 @@ export function parseMarketListings(html) {
|
|
150
150
|
const paramsMatch = cancelLink.match(/\(([^)]*)\)/);
|
151
151
|
if (!paramsMatch) return;
|
152
152
|
|
153
|
-
let [listingId, appId, contextId, itemId] = paramsMatch[1].split(",").map((param) => param.trim().replace(/^['"]|['"]$/g, ""));
|
153
|
+
let [, listingId, appId, contextId, itemId] = paramsMatch[1].split(",").map((param) => param.trim().replace(/^['"]|['"]$/g, ""));
|
154
154
|
|
155
155
|
appId = Number(appId);
|
156
156
|
contextId = Number(contextId);
|