mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 05:03:28 +08:00
Reduce Steam redirects
This commit is contained in:
@@ -13,7 +13,7 @@ SteamCommunity.prototype.getSteamUser = function(id, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this.httpRequest("http://steamcommunity.com/" + (typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()) + "/?xml=1", function(err, response, body) {
|
this.httpRequest("https://steamcommunity.com/" + (typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()) + "/?xml=1", function(err, response, body) {
|
||||||
if (err) {
|
if (err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ SteamCommunity.prototype.getGroupMembers = function(gid, callback, members, link
|
|||||||
if (!link) {
|
if (!link) {
|
||||||
if (typeof gid !== 'string') {
|
if (typeof gid !== 'string') {
|
||||||
// It's a SteamID object
|
// It's a SteamID object
|
||||||
link = "http://steamcommunity.com/gid/" + gid.toString() + "/memberslistxml/?xml=1";
|
link = "https://steamcommunity.com/gid/" + gid.toString() + "/memberslistxml/?xml=1";
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
var sid = new SteamID(gid);
|
var sid = new SteamID(gid);
|
||||||
if (sid.type == SteamID.Type.CLAN && sid.isValid()) {
|
if (sid.type == SteamID.Type.CLAN && sid.isValid()) {
|
||||||
link = "http://steamcommunity.com/gid/" + sid.getSteamID64() + "/memberslistxml/?xml=1";
|
link = "https://steamcommunity.com/gid/" + sid.getSteamID64() + "/memberslistxml/?xml=1";
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Doesn't particularly matter what this message is");
|
throw new Error("Doesn't particularly matter what this message is");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
link = "http://steamcommunity.com/groups/" + gid + "/memberslistxml/?xml=1";
|
link = "https://steamcommunity.com/groups/" + gid + "/memberslistxml/?xml=1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user