mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-09-06 07:14:54 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3cf2a4361 | ||
|
|
2890b70add | ||
|
|
1810727a2f | ||
|
|
3d566ed0fb | ||
|
|
80979bc387 | ||
|
|
4e326e3295 |
@@ -40,6 +40,11 @@ SteamCommunity.prototype.getSteamUser = function(id, callback) {
|
|||||||
customurl = match[1];
|
customurl = match[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!result.profile.steamID64 || !result.profile.onlineState) {
|
||||||
|
callback(new Error("No valid response"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
callback(null, new CSteamUser(self, result.profile, customurl));
|
callback(null, new CSteamUser(self, result.profile, customurl));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ SteamCommunity.prototype.getInventoryHistory = function(options, callback) {
|
|||||||
// Load the inventory item data
|
// Load the inventory item data
|
||||||
var match2 = body.match(/var g_rgHistoryInventory = (.*);/);
|
var match2 = body.match(/var g_rgHistoryInventory = (.*);/);
|
||||||
if(!match2) {
|
if(!match2) {
|
||||||
callback("Malformed page: no trade found");
|
callback(new Error("Malformed page: no trade found"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var historyInventory = JSON.parse(match2[1]);
|
var historyInventory = JSON.parse(match2[1]);
|
||||||
@@ -132,7 +132,7 @@ function resolveVanityURL(vanityURL, callback) {
|
|||||||
|
|
||||||
var match = body.match(/<steamID64>(\d+)<\/steamID64>/);
|
var match = body.match(/<steamID64>(\d+)<\/steamID64>/);
|
||||||
if(!match || !match[1]) {
|
if(!match || !match[1]) {
|
||||||
callback("Couldn't find Steam ID");
|
callback(new Error("Couldn't find Steam ID"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "steamcommunity",
|
"name": "steamcommunity",
|
||||||
"version": "3.9.0",
|
"version": "3.9.3",
|
||||||
"description": "Provides an interface for logging into and interacting with the Steam Community website",
|
"description": "Provides an interface for logging into and interacting with the Steam Community website",
|
||||||
"keywords": ["steam", "steam community"],
|
"keywords": ["steam", "steam community"],
|
||||||
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",
|
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",
|
||||||
|
|||||||
Reference in New Issue
Block a user