30 lines
709 B
C#
30 lines
709 B
C#
using Newtonsoft.Json;
|
|
using ProtoBuf;
|
|
|
|
namespace NostrServices.Client;
|
|
|
|
[ProtoContract]
|
|
public class LinkPreviewData
|
|
{
|
|
[ProtoMember(1)]
|
|
[JsonIgnore]
|
|
[System.Text.Json.Serialization.JsonIgnore]
|
|
public List<KeyValuePair<string, string>> OgTags { get; init; } = new();
|
|
|
|
[ProtoIgnore]
|
|
[JsonProperty("og_tags")]
|
|
public List<string[]> OgTagsJson => OgTags.Select(a => new[] {a.Key, a.Value}).ToList();
|
|
|
|
[ProtoMember(2)]
|
|
[JsonProperty("title")]
|
|
public string? Title { get; init; }
|
|
|
|
[ProtoMember(3)]
|
|
[JsonProperty("description")]
|
|
public string? Description { get; init; }
|
|
|
|
[ProtoMember(4)]
|
|
[JsonProperty("image")]
|
|
public string? Image { get; init; }
|
|
}
|