mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-17 00:04:36 +08:00
Fixed crashes when using various class methods
This commit is contained in:
parent
6d455e8797
commit
dee52bf7e2
@ -92,7 +92,7 @@ CMarketItem.prototype.updatePrice = function(callback) {
|
|||||||
"uri": "https://steamcommunity.com/market/itemordershistogram?country=US&language=english¤cy=1&item_nameid=" + this.commodityID,
|
"uri": "https://steamcommunity.com/market/itemordershistogram?country=US&language=english¤cy=1&item_nameid=" + this.commodityID,
|
||||||
"json": true,
|
"json": true,
|
||||||
}, function(err, response, body) {
|
}, function(err, response, body) {
|
||||||
if(self._checkHttpError(err, response, callback)) {
|
if(self._community._checkHttpError(err, response, callback)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,10 +27,11 @@ SteamCommunity.prototype.marketSearch = function(options, callback) {
|
|||||||
qs.count = 100;
|
qs.count = 100;
|
||||||
qs.sort_column = 'price';
|
qs.sort_column = 'price';
|
||||||
qs.sort_dir = 'asc';
|
qs.sort_dir = 'asc';
|
||||||
performSearch(this.request, qs, [], callback);
|
performSearch.call(this, this.request, qs, [], callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
function performSearch(request, qs, results, callback) {
|
function performSearch(request, qs, results, callback) {
|
||||||
|
var self = this;
|
||||||
request({
|
request({
|
||||||
"uri": "https://steamcommunity.com/market/search/render/",
|
"uri": "https://steamcommunity.com/market/search/render/",
|
||||||
"qs": qs,
|
"qs": qs,
|
||||||
|
@ -65,7 +65,7 @@ CSteamGroup.prototype.getMembers = function(callback, members, link) {
|
|||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this._community.request(link, function(err, response, body) {
|
this._community.request(link, function(err, response, body) {
|
||||||
if(self._checkHttpError(err, response, callback)) {
|
if(self._community._checkHttpError(err, response, callback)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ CSteamUser.prototype.addFriend = function(callback) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self._checkHttpError(err, response, callback)) {
|
if(self._community._checkHttpError(err, response, callback)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ CSteamUser.prototype.acceptFriendRequest = function(callback) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self._checkHttpError(err, response, callback)) {
|
if(self._community._checkHttpError(err, response, callback)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ CSteamUser.prototype.removeFriend = function(callback) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self._checkHttpError(err, response, callback)) {
|
if(self._community._checkHttpError(err, response, callback)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ CSteamUser.prototype.blockCommunication = function(callback) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self._checkHttpError(err, response, callback)) {
|
if(self._community._checkHttpError(err, response, callback)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user