-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicLicense.cs
More file actions
29 lines (26 loc) · 820 Bytes
/
BasicLicense.cs
File metadata and controls
29 lines (26 loc) · 820 Bytes
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
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace LicenseMe;
/// <summary>
/// Basic License information given by the Git-Hub API
/// </summary>
public class BasicLicense
{
public string Key { get; set; }
public string Name { get; set; }
[JsonPropertyName("spdx_id")]
public string SpdxId { get; set; }
public string Url { get; set; }
[JsonPropertyName("node_id")]
public string NodeId { get; set; }
/// <summary>
/// Asynchronously gets advanced information about this license from the GitHub-API
/// </summary>
/// <returns></returns>
public async Task<AdvancedLicense?> GetAdvancedLicenseInformation()
{
return await GithubApiCommunicator.GetAdvancedInformation(this);
}
}