re-organze namespace

This commit is contained in:
2024-09-06 08:45:36 +02:00
parent 939c87820f
commit 3625962a27
60 changed files with 401 additions and 212 deletions

View File

@@ -0,0 +1,24 @@
using Newtonsoft.Json;
namespace ModpackUpdater;
public class ModpackConfig
{
public bool Maintenance { get; set; }
public string Name { get; set; }
public string UpdateUrl { get; set; }
public string InstallUrl { get; set; }
public string UnleashApiUrl { get; set; }
public string UnleashInstanceId { get; set; }
[JsonIgnore]
public string ConfigUrl { get; set; }
public static ModpackConfig LoadFromUrl(string url)
{
var result = new HttpClient().GetStringAsync(url).Result;
var config = JsonConvert.DeserializeObject<ModpackConfig>(result);
config.ConfigUrl = url;
return config;
}
}