mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2024-12-25 22:30:09 +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} 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 {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
|
||||
*/
|
||||
SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, contextID, tradableOnly, callback) {
|
||||
SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, contextID, tradableOnly, language, callback) {
|
||||
var self = this;
|
||||
|
||||
if(typeof userID === 'string') {
|
||||
if (typeof userID === 'string') {
|
||||
userID = new SteamID(userID);
|
||||
}
|
||||
|
||||
if (typeof language === 'function') {
|
||||
callback = language;
|
||||
language = "english";
|
||||
}
|
||||
|
||||
var pos = 1;
|
||||
get([], []);
|
||||
|
||||
@ -359,7 +365,7 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
|
||||
"Referer": "https://steamcommunity.com/profiles/" + userID.getSteamID64() + "/inventory"
|
||||
},
|
||||
"qs": {
|
||||
"l": "english", // Default language
|
||||
"l": language, // Default language
|
||||
"count": 5000, // Max items per 'page'
|
||||
"start_assetid": start
|
||||
},
|
||||
|
@ -2,7 +2,10 @@
|
||||
"name": "steamcommunity",
|
||||
"version": "3.30.7",
|
||||
"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",
|
||||
"bugs": {
|
||||
"url": "https://github.com/DoctorMcKay/node-steamcommunity/issues"
|
||||
|
Loading…
Reference in New Issue
Block a user