using Mlaumcherb.Client.Avalonia.сеть;

namespace Mlaumcherb.Client.Avalonia.классы;


public class GameVersionCatalogProps
{
    [JsonRequired] public required string name { get; init; }
    [JsonRequired] public required string url { get; init; }
        
    public override string ToString() => name;
    
    public async Task<GameVersionCatalog> GetVersionCatalogAsync()
    {
        return await NetworkHelper.DownloadStringAndDeserialize<GameVersionCatalog>(url);
    }
}