steam-api-node icon indicating copy to clipboard operation
steam-api-node copied to clipboard

GetPlayerBans do not return full Steam_Web_API Object

Open Mediumwater opened this issue 8 years ago • 2 comments

The Method GetPlayerBans should return:

SteamId (string) CommunityBanned (bool) VACBanned (bool) NumberOfVACBans (int) DaysSinceLastBan (int) NumberOfGameBans (int) EconomyBan (string) like in: https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerBans_.28v1.29

Your Method just returnes: steamId: '', communityBanned: , VACBanned: , numberOfVACBans: , daysSinceLastBan: , economyBan: ''

So without NumberOfGameBans it is not Possible to find out if the Player is banned since today, cause then it says 0 daysSinceLastBan.

Mediumwater avatar Feb 09 '17 17:02 Mediumwater

Actually solved it:

go into: node_modules/steam-api/steam/containers/player/Bans.js ( steam-api-node/steam/containers/player/Bans.js )

Update the Object like: function Bans(player) { this.steamId = player.SteamId; this.communityBanned = player.CommunityBanned; this.VACBanned = player.VACBanned; this.numberOfVACBans = player.NumberOfVACBans; this.daysSinceLastBan = player.DaysSinceLastBan; this.economyBan = player.EconomyBan; this.numberOfGameBans = player.NumberOfGameBans
}

Now the returned Object by the Method GetPlayerBans containes the value.

var User = new SteamApi.User('steam_api_key'); User.GetPlayerBans(steam_id).done(function(result){ console.log(result); }

Mediumwater avatar Feb 09 '17 17:02 Mediumwater

Hello. I would get last 20 vac ban list using Steam API. Please assist me. Thanks

willowTank avatar Dec 18 '17 01:12 willowTank