mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 13:13:28 +08:00
Removed now-unnecessary _checkHttpError and _checkCommunityError calls
This commit is contained in:
@@ -8,7 +8,8 @@ SteamCommunity.prototype.getMarketItem = function(appid, hashName, currency, cal
|
||||
}
|
||||
var self = this;
|
||||
this.httpRequest("https://steamcommunity.com/market/listings/" + appid + "/" + encodeURIComponent(hashName), function(err, response, body) {
|
||||
if(self._checkHttpError(err, response, callback)) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,7 +108,8 @@ CMarketItem.prototype.updatePriceForCommodity = function(currency, callback) {
|
||||
"uri": "https://steamcommunity.com/market/itemordershistogram?country=US&language=english¤cy=" + currency + "&item_nameid=" + this.commodityID,
|
||||
"json": true
|
||||
}, function(err, response, body) {
|
||||
if(self._community._checkHttpError(err, response, callback)) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -153,7 +155,8 @@ CMarketItem.prototype.updatePriceForNonCommodity = function (currency, callback)
|
||||
"/render/?query=&start=0&count=10&country=US&language=english¤cy=" + currency,
|
||||
"json": true
|
||||
}, function(err, response, body) {
|
||||
if (self._community._checkHttpError(err, response, callback)) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ function performSearch(request, qs, results, callback) {
|
||||
},
|
||||
"json": true
|
||||
}, function(err, response, body) {
|
||||
if(self._checkHttpError(err, response, callback)) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,8 @@ SteamCommunity.prototype.getSteamGroup = function(id, callback) {
|
||||
|
||||
var self = this;
|
||||
this.httpRequest("https://steamcommunity.com/" + (typeof id === 'string' ? "groups/" + id : "gid/" + id.toString()) + "/memberslistxml/?xml=1", function(err, response, body) {
|
||||
if(self._checkHttpError(err, response, callback)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(self._checkCommunityError(body, callback)) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,8 @@ SteamCommunity.prototype.getSteamUser = function(id, callback) {
|
||||
|
||||
var self = this;
|
||||
this.httpRequest("http://steamcommunity.com/" + (typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()) + "/?xml=1", function(err, response, body) {
|
||||
if(self._checkHttpError(err, response, callback)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(self._checkCommunityError(body, callback)) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user