feat: add DTOs for basic endpoints
This commit is contained in:
36
DTOs/SubsonicResponseDTO.cs
Normal file
36
DTOs/SubsonicResponseDTO.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Shadow.DTOs;
|
||||
|
||||
public class SubsonicResponseDTO
|
||||
{
|
||||
[JsonPropertyName("status")]
|
||||
public string Status { get; set; } = "ok";
|
||||
|
||||
[JsonPropertyName("version")]
|
||||
public string version { get; set; } = "1.15.0";
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string type { get; set; } = "shadow";
|
||||
|
||||
[JsonPropertyName("serverVersion")]
|
||||
public string serverVersion { get; set; } = $"0.0.1 ({ThisAssembly.Git.Commit})";
|
||||
|
||||
[JsonPropertyName("openSubsonic")]
|
||||
public bool openSubsonic { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("error")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public ErrorDTO? error { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("albumList2")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public AlbumList2DTO? albumList2 { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("user")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public UserPingDTO? userPing { get; set; } = null;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user