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
97
97
[ EnumMember ( Value = "table_row" ) ]
98
98
TableRow ,
99
99
100
+ [ EnumMember ( Value = "link_preview" ) ]
101
+ LinkPreview ,
102
+
100
103
[ EnumMember ( Value = "unsupported" ) ]
101
104
Unsupported
102
105
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ namespace Notion.Client
23
23
[ JsonSubtypes . KnownSubType ( typeof ( HeadingTwoBlock ) , BlockType . Heading_2 ) ]
24
24
[ JsonSubtypes . KnownSubType ( typeof ( HeadingThreeeBlock ) , BlockType . Heading_3 ) ]
25
25
[ JsonSubtypes . KnownSubType ( typeof ( ImageBlock ) , BlockType . Image ) ]
26
+ [ JsonSubtypes . KnownSubType ( typeof ( LinkPreviewBlock ) , BlockType . LinkPreview ) ]
26
27
[ JsonSubtypes . KnownSubType ( typeof ( LinkToPageBlock ) , BlockType . LinkToPage ) ]
27
28
[ JsonSubtypes . KnownSubType ( typeof ( NumberedListItemBlock ) , BlockType . NumberedListItem ) ]
28
29
[ 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