pleroma: private ctors

This commit is contained in:
uwaa 2024-12-25 23:09:26 +00:00
parent b623cb5fc6
commit e5273860a6
9 changed files with 44 additions and 0 deletions

View file

@ -53,6 +53,10 @@ public class Account : ASObject
} }
} }
internal Account()
{
}
public override string ToString() => $"@{Webfinger}"; public override string ToString() => $"@{Webfinger}";
} }

View file

@ -9,4 +9,8 @@ public class AccountField
public string Value { get; set; } = null!; public string Value { get; set; } = null!;
public DateTime? VerifiedAt { get; set; } public DateTime? VerifiedAt { get; set; }
internal AccountField()
{
}
} }

View file

@ -50,6 +50,10 @@ public class Attachment
[JsonPropertyName("url")] [JsonPropertyName("url")]
public string URL { get; set; } = null!; public string URL { get; set; } = null!;
internal Attachment()
{
}
/// <summary> /// <summary>
/// Downloads the attachment. /// Downloads the attachment.
/// </summary> /// </summary>

View file

@ -7,4 +7,8 @@ public class Context
[JsonPropertyName("descendants")] [JsonPropertyName("descendants")]
public Status[] Descendants { get; set; } = null!; public Status[] Descendants { get; set; } = null!;
internal Context()
{
}
} }

View file

@ -14,5 +14,9 @@ public class Hashtag
[JsonPropertyName("url")] [JsonPropertyName("url")]
public string URL { get; set; } = null!; public string URL { get; set; } = null!;
internal Hashtag()
{
}
public override string ToString() => $"#{Name}"; public override string ToString() => $"#{Name}";
} }

View file

@ -28,5 +28,9 @@ public class Mention
[JsonPropertyName("username")] [JsonPropertyName("username")]
public string Username { get; set; } = null!; public string Username { get; set; } = null!;
internal Mention()
{
}
public override string ToString() => $"@{Account}"; public override string ToString() => $"@{Account}";
} }

View file

@ -49,4 +49,8 @@ public class Relationship
[JsonPropertyName("subscribing")] [JsonPropertyName("subscribing")]
public bool Subscribing { get; set; } public bool Subscribing { get; set; }
internal Relationship()
{
}
} }

View file

@ -19,4 +19,8 @@ public class SearchResults
/// </summary> /// </summary>
[JsonPropertyName("statuses")] [JsonPropertyName("statuses")]
public Status[]? Statuses { get; set; } public Status[]? Statuses { get; set; }
internal SearchResults()
{
}
} }

View file

@ -140,6 +140,10 @@ public class Status : ASObject
[JsonIgnore] [JsonIgnore]
public string Content => Pleroma?.Content?.Plain ?? HtmlContent; public string Content => Pleroma?.Content?.Plain ?? HtmlContent;
internal Status()
{
}
/// <summary> /// <summary>
/// Returns true if a status mentions or replies to a user. /// Returns true if a status mentions or replies to a user.
/// </summary> /// </summary>
@ -165,12 +169,20 @@ public class PleromaStatusData
[JsonPropertyName("quote_id")] [JsonPropertyName("quote_id")]
public string? QuoteID { get; set; } public string? QuoteID { get; set; }
internal PleromaStatusData()
{
}
} }
public class PleromaStatusContent public class PleromaStatusContent
{ {
[JsonPropertyName("text/plain")] [JsonPropertyName("text/plain")]
public string Plain { get; set; } = null!; public string Plain { get; set; } = null!;
internal PleromaStatusContent()
{
}
} }
[JsonConverter(typeof(StatusIDConverter))] [JsonConverter(typeof(StatusIDConverter))]