diff --git a/ArchiSteamFarm/Actions.cs b/ArchiSteamFarm/Actions.cs index c92d46eeb..e638aa7ae 100644 --- a/ArchiSteamFarm/Actions.cs +++ b/ArchiSteamFarm/Actions.cs @@ -326,24 +326,6 @@ namespace ArchiSteamFarm { return (true, Strings.BotLootingSuccess); } - [Obsolete] - [PublicAPI] - public async Task<(bool Success, string Message)> SendTradeOffer(uint appID = Steam.Asset.SteamAppID, ulong contextID = Steam.Asset.SteamCommunityContextID, ulong targetSteamID = 0, string tradeToken = null, IReadOnlyCollection wantedRealAppIDs = null, IReadOnlyCollection unwantedRealAppIDs = null, IReadOnlyCollection wantedTypes = null) { - if ((appID == 0) || (contextID == 0)) { - Bot.ArchiLogger.LogNullError(nameof(appID) + " || " + nameof(contextID)); - - return (false, string.Format(Strings.ErrorObjectIsNull, nameof(appID) + " || " + nameof(contextID))); - } - - if ((wantedRealAppIDs?.Count == 0) || (unwantedRealAppIDs?.Count == 0) || (wantedTypes?.Count == 0)) { - Bot.ArchiLogger.LogNullError(nameof(wantedRealAppIDs) + " || " + nameof(unwantedRealAppIDs) + " || " + nameof(wantedTypes)); - - return (false, string.Format(Strings.ErrorObjectIsNull, nameof(wantedRealAppIDs) + " || " + nameof(unwantedRealAppIDs) + " || " + nameof(wantedTypes))); - } - - return await SendInventory(appID, contextID, targetSteamID, tradeToken, item => (wantedRealAppIDs?.Contains(item.RealAppID) != false) && (unwantedRealAppIDs?.Contains(item.RealAppID) != true) && (wantedTypes?.Contains(item.Type) != false)).ConfigureAwait(false); - } - [PublicAPI] public (bool Success, string Message) Start() { if (Bot.KeepRunning) { diff --git a/ArchiSteamFarm/ArchiWebHandler.cs b/ArchiSteamFarm/ArchiWebHandler.cs index 19f96fc3d..1f04f96f9 100644 --- a/ArchiSteamFarm/ArchiWebHandler.cs +++ b/ArchiSteamFarm/ArchiWebHandler.cs @@ -121,37 +121,6 @@ namespace ArchiSteamFarm { return string.IsNullOrEmpty(VanityURL) ? "/profiles/" + Bot.SteamID : "/id/" + VanityURL; } - [ItemCanBeNull] - [Obsolete] - [PublicAPI] - public async Task> GetInventory(ulong steamID = 0, uint appID = Steam.Asset.SteamAppID, ulong contextID = Steam.Asset.SteamCommunityContextID, bool? marketable = null, bool? tradable = null, IReadOnlyCollection wantedRealAppIDs = null, IReadOnlyCollection unwantedRealAppIDs = null, IReadOnlyCollection wantedTypes = null, IReadOnlyCollection<(uint RealAppID, Steam.Asset.EType Type, Steam.Asset.ERarity Rarity)> wantedSets = null) { - if ((appID == 0) || (contextID == 0)) { - Bot.ArchiLogger.LogNullError(nameof(appID) + " || " + nameof(contextID)); - - return null; - } - - Bot.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(GetInventory) + " (" + nameof(Plugins) + ")", nameof(GetInventoryAsync))); - - try { - return await GetInventoryAsync(steamID, appID, contextID).Where( - item => - (!marketable.HasValue || (item.Marketable == marketable.Value)) && - (!tradable.HasValue || (item.Tradable == tradable.Value)) && - (wantedRealAppIDs?.Contains(item.RealAppID) != false) && - (unwantedRealAppIDs?.Contains(item.RealAppID) != true) && - (wantedTypes?.Contains(item.Type) != false) && - (wantedSets?.Contains((item.RealAppID, item.Type, item.Rarity)) != false) - ).ToHashSetAsync().ConfigureAwait(false); - } catch (HttpRequestException) { - return null; - } catch (Exception e) { - Bot.ArchiLogger.LogGenericException(e); - - return null; - } - } - [JetBrains.Annotations.NotNull] [PublicAPI] [SuppressMessage("ReSharper", "FunctionComplexityOverflow")]