Update services client
This commit is contained in:
29
NostrServices.Model/LinkPreviewData.cs
Normal file
29
NostrServices.Model/LinkPreviewData.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace NostrServices.Model;
|
||||
|
||||
[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; }
|
||||
}
|
Reference in New Issue
Block a user