Update services client

This commit is contained in:
2024-02-02 16:40:26 +00:00
parent 5c29d6a6c7
commit f48bc11644
16 changed files with 208 additions and 173 deletions

View 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; }
}