Compare commits

...

5 Commits

Author SHA1 Message Date
Alexander Corn
cf7e5f8995 3.33.0 2017-10-06 12:01:10 -04:00
Alexander Corn
a03dad9507 Added getTradeURL method 2017-10-02 14:55:29 -04:00
Alexander Corn
7da7ecfc56 3.32.3 2017-09-29 00:13:17 -04:00
Alex Corn
6bf3f26f2f Merge pull request #175 from Visagalis/patch-1
Typo/bug in GetGroupHistory code.
2017-09-29 00:13:00 -04:00
Julius
d7095aa7c5 Typo/bug in GetGroupHistory code.
Typo which makes group history objects to contain incorrect actor (it contains same actor as user).
2017-08-08 21:52:12 +03:00
3 changed files with 14 additions and 2 deletions

View File

@@ -494,7 +494,7 @@ SteamCommunity.prototype.getGroupHistory = function(gid, page, callback) {
sid.universe = SteamID.Universe.PUBLIC;
sid.type = SteamID.Type.INDIVIDUAL;
sid.instance = SteamID.Instance.DESKTOP;
sid.accountid = $(users[0]).data('miniprofile');
sid.accountid = $(users[1]).data('miniprofile');
data.actor = sid;
}

View File

@@ -370,6 +370,18 @@ SteamCommunity.prototype.loggedIn = function(callback) {
}, "steamcommunity");
};
SteamCommunity.prototype.getTradeURL = function(callback) {
this._myProfile("/tradeoffers/privacy", null, (err, response, body) => {
var match = body.match(/https?:\/\/(www.)?steamcommunity.com\/tradeoffer\/new\/?\?partner=\d+(&|&)token=([a-zA-Z0-9-_]+)/);
if (match) {
var token = match[3];
callback(null, match[0], token);
} else {
callback(new Error("Malformed response"));
}
}, "tradeoffermanager");
};
SteamCommunity.prototype._myProfile = function(endpoint, form, callback) {
var self = this;

View File

@@ -1,6 +1,6 @@
{
"name": "steamcommunity",
"version": "3.32.2",
"version": "3.33.0",
"description": "Provides an interface for logging into and interacting with the Steam Community website",
"keywords": [
"steam",