mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-13 20:30:14 +08:00
Added language argument to getUserInventoryContents
This commit is contained in:
parent
3045a5d0cc
commit
b5142ad0cc
@ -340,15 +340,21 @@ SteamCommunity.prototype.getUserInventory = function(userID, appID, contextID, t
|
|||||||
* @param {int} appID - The Steam application ID of the game for which you want an inventory
|
* @param {int} appID - The Steam application ID of the game for which you want an inventory
|
||||||
* @param {int} contextID - The ID of the "context" within the game you want to retrieve
|
* @param {int} contextID - The ID of the "context" within the game you want to retrieve
|
||||||
* @param {boolean} tradableOnly - true to get only tradable items and currencies
|
* @param {boolean} tradableOnly - true to get only tradable items and currencies
|
||||||
|
* @param {string} [language] - The language of item descriptions to return. Omit for default (which may either be English or your account's chosen language)
|
||||||
* @param {function} callback
|
* @param {function} callback
|
||||||
*/
|
*/
|
||||||
SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, contextID, tradableOnly, callback) {
|
SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, contextID, tradableOnly, language, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if(typeof userID === 'string') {
|
if (typeof userID === 'string') {
|
||||||
userID = new SteamID(userID);
|
userID = new SteamID(userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof language === 'function') {
|
||||||
|
callback = language;
|
||||||
|
language = "english";
|
||||||
|
}
|
||||||
|
|
||||||
var pos = 1;
|
var pos = 1;
|
||||||
get([], []);
|
get([], []);
|
||||||
|
|
||||||
@ -359,7 +365,7 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
|
|||||||
"Referer": "https://steamcommunity.com/profiles/" + userID.getSteamID64() + "/inventory"
|
"Referer": "https://steamcommunity.com/profiles/" + userID.getSteamID64() + "/inventory"
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"l": "english", // Default language
|
"l": language, // Default language
|
||||||
"count": 5000, // Max items per 'page'
|
"count": 5000, // Max items per 'page'
|
||||||
"start_assetid": start
|
"start_assetid": start
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
"name": "steamcommunity",
|
"name": "steamcommunity",
|
||||||
"version": "3.30.7",
|
"version": "3.30.7",
|
||||||
"description": "Provides an interface for logging into and interacting with the Steam Community website",
|
"description": "Provides an interface for logging into and interacting with the Steam Community website",
|
||||||
"keywords": ["steam", "steam community"],
|
"keywords": [
|
||||||
|
"steam",
|
||||||
|
"steam community"
|
||||||
|
],
|
||||||
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",
|
"homepage": "https://github.com/DoctorMcKay/node-steamcommunity",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/DoctorMcKay/node-steamcommunity/issues"
|
"url": "https://github.com/DoctorMcKay/node-steamcommunity/issues"
|
||||||
|
Loading…
Reference in New Issue
Block a user