File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Src/Notion.Client/Models/Blocks Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ public enum BlockType
9797 [ EnumMember ( Value = "table_row" ) ]
9898 TableRow ,
9999
100+ [ EnumMember ( Value = "link_preview" ) ]
101+ LinkPreview ,
102+
100103 [ EnumMember ( Value = "unsupported" ) ]
101104 Unsupported
102105 }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ namespace Notion.Client
2323 [ JsonSubtypes . KnownSubType ( typeof ( HeadingTwoBlock ) , BlockType . Heading_2 ) ]
2424 [ JsonSubtypes . KnownSubType ( typeof ( HeadingThreeeBlock ) , BlockType . Heading_3 ) ]
2525 [ JsonSubtypes . KnownSubType ( typeof ( ImageBlock ) , BlockType . Image ) ]
26+ [ JsonSubtypes . KnownSubType ( typeof ( LinkPreviewBlock ) , BlockType . LinkPreview ) ]
2627 [ JsonSubtypes . KnownSubType ( typeof ( LinkToPageBlock ) , BlockType . LinkToPage ) ]
2728 [ JsonSubtypes . KnownSubType ( typeof ( NumberedListItemBlock ) , BlockType . NumberedListItem ) ]
2829 [ JsonSubtypes . KnownSubType ( typeof ( ParagraphBlock ) , BlockType . Paragraph ) ]
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+
3+ namespace Notion . Client
4+ {
5+ public class LinkPreviewBlock : Block , IColumnChildrenBlock , INonColumnBlock
6+ {
7+ public override BlockType Type => BlockType . LinkPreview ;
8+
9+ [ JsonProperty ( "link_preview" ) ] public Data LinkPreview { get ; set ; }
10+
11+ public class Data
12+ {
13+ [ JsonProperty ( "url" ) ] public string Url { get ; set ; }
14+ }
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments