-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjects.cs
37 lines (34 loc) · 1021 Bytes
/
Objects.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Text.Json.Serialization;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Lamp
{
public class Release
{
[JsonPropertyName("tag_name")]
public string Version { get; set; }
[JsonPropertyName("html_url")]
public string ReleaseURL { get; set; }
[JsonPropertyName("assets_url")]
public string AssetsURL { get; set; }
public Dictionary<string, Asset> Assets { get; set; }
public bool HasAssets { get; set; }
public async Task LoadAssets()
{
HasAssets = await FileHandler.LoadReleaseAssets(this);
}
}
public class Asset
{
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("browser_download_url")]
public string DownloadURL { get; set; }
public string LocalFilepath {
get
{
return FileHandler.LocalDirectory + "\\" + Name;
}
}
}
}