BililiveRecorder/BililiveRecorder.Core/Api/Model/RoomInfo.cs

57 lines
1.5 KiB
C#
Raw Normal View History

2021-02-23 18:03:37 +08:00
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
2021-02-23 18:03:37 +08:00
namespace BililiveRecorder.Core.Api.Model
{
public class RoomInfo
{
[JsonProperty("room_info")]
public InnerRoomInfo Room { get; set; } = new InnerRoomInfo();
2021-02-23 18:03:37 +08:00
[JsonProperty("anchor_info")]
public UserInfo User { get; set; } = new UserInfo();
2021-02-23 18:03:37 +08:00
[JsonIgnore]
public JObject? RawBilibiliApiJsonData;
2021-02-23 18:03:37 +08:00
public class UserInfo
{
[JsonProperty("base_info")]
public UserBaseInfo BaseInfo { get; set; } = null!;
}
2021-02-23 18:03:37 +08:00
public class UserBaseInfo
{
[JsonProperty("uname")]
public string Name { get; set; } = string.Empty;
}
2021-02-23 18:03:37 +08:00
public class InnerRoomInfo
{
[JsonProperty("room_id")]
public int RoomId { get; set; }
2021-02-23 18:03:37 +08:00
[JsonProperty("short_id")]
public int ShortId { get; set; }
2021-02-23 18:03:37 +08:00
[JsonProperty("live_status")]
public int LiveStatus { get; set; }
[JsonProperty("area_id")]
public int AreaId { get; set; }
[JsonProperty("parent_area_id")]
public int ParentAreaId { get; set; }
[JsonProperty("area_name")]
public string AreaName { get; set; } = string.Empty;
[JsonProperty("parent_area_name")]
public string ParentAreaName { get; set; } = string.Empty;
[JsonProperty("title")]
public string Title { get; set; } = string.Empty;
}
2021-02-23 18:03:37 +08:00
}
}