public void Logout() { var sessionId = SessionId(); var data = new Dictionary <string, string> { { "sessionid", sessionId } }; _steam.Request(Urls.Logout, Method.POST, Urls.Market, data, true); ResetAuth(); }
public Dictionary <JInvertoryAsset, JDescription> Get(long userId, int appId, int contextId, int count = 500, bool useAuth = false) { var url = Urls.Inventory + $"{userId}/{appId}/{contextId}"; var urlQuery = new Dictionary <string, string> { { "count", count.ToString() } }; var resp = _steam.Request(url, Method.GET, Urls.Inventory, urlQuery, useAuth); var respDes = JsonConvert.DeserializeObject <JInvertory>(resp.Data.Content); if (respDes.TotalInventoryCount == 0) { return(new Dictionary <JInvertoryAsset, JDescription>()); } var dic = respDes.Assets.ToDictionary(x => x, x => respDes.Descriptions.FirstOrDefault(f => f.Classid == x.ClassId)); return(dic); }