Removed now-unnecessary _checkHttpError and _checkCommunityError calls

This commit is contained in:
Alexander Corn
2016-03-04 23:59:49 -05:00
parent fce2560abe
commit 1032b1f832
12 changed files with 74 additions and 140 deletions

View File

@@ -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&currency=" + 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&currency=" + currency,
"json": true
}, function(err, response, body) {
if (self._community._checkHttpError(err, response, callback)) {
if (err) {
callback(err);
return;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}