Compare commits

...

12 Commits

Author SHA1 Message Date
Alexander Corn
7627e6a3a0 3.17.2 2016-01-13 01:02:52 -05:00
Alexander Corn
bbcf0eb72f Merge pull request #65 from spddl/master
Error: You must fill out all fields in at least one language - fix
2016-01-13 01:01:58 -05:00
spddl
d51b6582e2 Error: You must fill out all fields in at least one language fix 2016-01-13 06:16:51 +01:00
Alexander Corn
bbd339b88b 3.17.1 2016-01-05 22:46:05 -05:00
Alexander Corn
fcaaa38085 Merge pull request #59 from Aareksio/master
Fixed chatMessage function
2016-01-05 22:44:54 -05:00
Mole
6d8d0c5fbb Fixed missing 'var self = this;' 2016-01-05 15:33:54 +01:00
Alexander Corn
08c9ab6809 3.17.0 2016-01-04 19:17:46 -05:00
Alexander Corn
c150425ee5 Use gzip for HTTP requests 2016-01-03 14:38:02 -05:00
Alexander Corn
5c2666e0f4 Merge pull request #55 from Mikxail/constructor-additional-options
additional options for SteamCommunity constructor
2015-12-28 00:24:11 -05:00
Alexander Corn
c64b6c7e99 Merge pull request #53 from Mikxail/bugfix-market-search
bugfix call performSearch
2015-12-28 00:17:26 -05:00
Mikhail Konovalov
318f9ab2b4 bugfix call performSearch 2015-12-27 16:53:15 +03:00
Mikhail Konovalov
3167034b97 additional options for SteamCommunity constructor 2015-12-27 16:08:06 +03:00
5 changed files with 25 additions and 11 deletions

View File

@@ -69,7 +69,7 @@ function performSearch(request, qs, results, callback) {
callback(null, results);
} else {
qs.start += body.pagesize;
performSearch(request, qs, results, callback);
performSearch.call(self, request, qs, results, callback);
}
});
}

View File

@@ -101,7 +101,8 @@ SteamCommunity.prototype.chatMessage = function(recipient, text, type, callback)
}
type = type || 'saytext';
var self = this;
this.request.post({
"uri": "https://api.steampowered.com/ISteamWebUserPresenceOAuth/Message/v1",
"form": {

View File

@@ -137,7 +137,9 @@ SteamCommunity.prototype.postGroupAnnouncement = function(gid, headline, content
"sessionID": this.getSessionID(),
"action": "post",
"headline": headline,
"body": content
"body": content,
"languages[0][headline]": headline,
"languages[0][body]": content
}
}, function(err, response, body) {
if(!callback) {

View File

@@ -11,25 +11,36 @@ module.exports = SteamCommunity;
SteamCommunity.SteamID = SteamID;
function SteamCommunity(localAddress) {
function SteamCommunity(options) {
options = options || {};
this._jar = Request.jar();
this._captchaGid = -1;
this.chatState = SteamCommunity.ChatState.Offline;
var defaults = {
"jar": this._jar,
"timeout": 50000,
"timeout": options.timeout || 50000,
"gzip": true,
"headers": {
"User-Agent": USER_AGENT
"User-Agent": options.userAgent || USER_AGENT
}
};
if(localAddress) {
defaults.localAddress = localAddress;
if (typeof options == "string") {
options = {
localAddress: options
};
}
this._options = options;
if (options.localAddress) {
defaults.localAddress = options.localAddress;
}
this.request = Request.defaults(defaults);
this.request = options.request || Request.defaults();
this.request = this.request.defaults(defaults);
// English
this._jar.setCookie(Request.cookie('Steam_Language=english'), 'https://steamcommunity.com');

View File

@@ -1,6 +1,6 @@
{
"name": "steamcommunity",
"version": "3.16.0",
"version": "3.17.2",
"description": "Provides an interface for logging into and interacting with the Steam Community website",
"keywords": ["steam", "steam community"],
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",