mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-22 14:43:29 +08:00
Changes for code consistency
This commit is contained in:
@@ -522,7 +522,6 @@ SteamCommunity.prototype.getGroupHistory = function(gid, page, callback) {
|
|||||||
SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callback) {
|
SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callback) {
|
||||||
var options = {
|
var options = {
|
||||||
uri: "http://steamcommunity.com/comment/Clan/render/" + gid.getSteamID64() + "/-1/",
|
uri: "http://steamcommunity.com/comment/Clan/render/" + gid.getSteamID64() + "/-1/",
|
||||||
method: "POST",
|
|
||||||
form: {
|
form: {
|
||||||
start: from,
|
start: from,
|
||||||
count: count
|
count: count
|
||||||
@@ -530,7 +529,7 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
|
|||||||
};
|
};
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this.httpRequest(options, function(err, response, body) {
|
this.httpRequestPost(options, function(err, response, body) {
|
||||||
if (err) {
|
if (err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
return;
|
return;
|
||||||
@@ -538,7 +537,7 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
|
|||||||
|
|
||||||
var comments = [];
|
var comments = [];
|
||||||
|
|
||||||
$ = Cheerio.load(JSON.parse(body).comments_html);
|
var $ = Cheerio.load(JSON.parse(body).comments_html);
|
||||||
|
|
||||||
$(".commentthread_comment_content").each(function () {
|
$(".commentthread_comment_content").each(function () {
|
||||||
var comment = {};
|
var comment = {};
|
||||||
@@ -561,7 +560,8 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
|
|||||||
};
|
};
|
||||||
|
|
||||||
SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) {
|
SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) {
|
||||||
if(Number.isInteger(cid)) {
|
|
||||||
|
if(typeof cid !== 'string') {
|
||||||
cid = cid.toString();
|
cid = cid.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user