mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 22:20:52 +00:00
Decrease size of the request
We reached a point where it actually matters whether we say "realAppID" or just "r", since we're doing this sometimes even 600k times, multiplied by 9 properties that we have
This commit is contained in:
@@ -57,7 +57,7 @@ internal static class Backend {
|
||||
throw new ArgumentOutOfRangeException(nameof(tradeToken));
|
||||
}
|
||||
|
||||
Uri request = new(ArchiNet.URL, "/Api/Listing/Announce");
|
||||
Uri request = new(ArchiNet.URL, "/Api/Listing/Announce/v2");
|
||||
|
||||
AnnouncementRequest data = new(ASF.GlobalDatabase?.Identifier ?? Guid.NewGuid(), bot.SteamID, tradeToken, inventory, acceptedMatchableTypes, bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchEverything), ASF.GlobalConfig?.MaxTradeHoldDuration ?? GlobalConfig.DefaultMaxTradeHoldDuration, nickname, avatarHash);
|
||||
|
||||
@@ -80,7 +80,7 @@ internal static class Backend {
|
||||
throw new ArgumentNullException(nameof(acceptedMatchableTypes));
|
||||
}
|
||||
|
||||
Uri request = new(ArchiNet.URL, "/Api/Listing/Inventories");
|
||||
Uri request = new(ArchiNet.URL, "/Api/Listing/Inventories/v2");
|
||||
|
||||
Dictionary<string, string> headers = new(1, StringComparer.Ordinal) {
|
||||
{ "X-License-Key", licenseID.ToString("N") }
|
||||
|
||||
@@ -26,10 +26,10 @@ using Newtonsoft.Json;
|
||||
namespace ArchiSteamFarm.OfficialPlugins.ItemsMatcher.Data;
|
||||
|
||||
internal sealed class AssetForListing : AssetInInventory {
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("i", Required = Required.Always)]
|
||||
internal readonly uint Index;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("l", Required = Required.Always)]
|
||||
internal readonly ulong PreviousAssetID;
|
||||
|
||||
internal AssetForListing(Asset asset, uint index, ulong previousAssetID) : base(asset) {
|
||||
|
||||
@@ -26,25 +26,25 @@ using Newtonsoft.Json;
|
||||
namespace ArchiSteamFarm.OfficialPlugins.ItemsMatcher.Data;
|
||||
|
||||
internal class AssetInInventory {
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("a", Required = Required.Always)]
|
||||
internal readonly uint Amount;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("d", Required = Required.Always)]
|
||||
internal readonly ulong AssetID;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("c", Required = Required.Always)]
|
||||
internal readonly ulong ClassID;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("r", Required = Required.Always)]
|
||||
internal readonly Asset.ERarity Rarity;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("e", Required = Required.Always)]
|
||||
internal readonly uint RealAppID;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("t", Required = Required.Always)]
|
||||
internal readonly bool Tradable;
|
||||
|
||||
[JsonProperty(Required = Required.Always)]
|
||||
[JsonProperty("p", Required = Required.Always)]
|
||||
internal readonly Asset.EType Type;
|
||||
|
||||
internal AssetInInventory(Asset asset) {
|
||||
|
||||
Reference in New Issue
Block a user