Files
minecraft-modpack-updater/ModpackUpdater.Model/ModpackConfig.cs
Schedel Pascal 20c1e5dc8e install keys
2024-06-21 08:55:46 +02:00

23 lines
618 B
C#

using Newtonsoft.Json;
namespace ModpackUpdater.Model;
public class ModpackConfig
{
public bool Maintenance { get; set; }
public string Name { get; set; }
public string Key { get; set; }
public string UpdateUrl { get; set; }
public string InstallUrl { get; set; }
[JsonIgnore]
public string ConfigUrl { get; set; }
public static ModpackConfig LoadFromUrl(string url)
{
string result = new HttpClient().GetStringAsync(url).Result;
var config = JsonConvert.DeserializeObject<ModpackConfig>(result);
config.ConfigUrl = url;
return config;
}
}