Skip to content

Commit

Permalink
Added support for "custom_emoji" page icons
Browse files Browse the repository at this point in the history
  • Loading branch information
HermanSchoenfeld committed Nov 11, 2024
1 parent fc89270 commit 781ab72
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Src/Notion.Client/Models/CustomEmojiObject.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Newtonsoft.Json;

namespace Notion.Client
{
public class CustomEmojiObject : IPageIcon
{
[JsonProperty("type")]
public virtual string Type { get; set; }

[JsonProperty("custom_emoji")]
public Info Emoji { get; set; }

public class Info
{
[JsonProperty("id")]
public string Id { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("url")]
public string Url { get; set; }
}
}
}
1 change: 1 addition & 0 deletions Src/Notion.Client/Models/Page/IPageIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Notion.Client
[JsonSubtypes.KnownSubTypeAttribute(typeof(EmojiObject), "emoji")]
[JsonSubtypes.KnownSubTypeAttribute(typeof(FileObject), "file")]
[JsonSubtypes.KnownSubTypeAttribute(typeof(FileObject), "external")]
[JsonSubtypes.KnownSubTypeAttribute(typeof(CustomEmojiObject), "custom_emoji")]
public interface IPageIcon
{
[JsonProperty("type")]
Expand Down

0 comments on commit 781ab72

Please sign in to comment.