File tree Expand file tree Collapse file tree 6 files changed +90
-0
lines changed
Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks Expand file tree Collapse file tree 6 files changed +90
-0
lines changed Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using Newtonsoft . Json ;
3+
4+ namespace Notion . Client
5+ {
6+ public class TableRowUpdateBlock : UpdateBlock , IUpdateBlock
7+ {
8+ [ JsonProperty ( "table_row" ) ]
9+ public Info TableRow { get ; set ; }
10+
11+ public class Info
12+ {
13+ [ JsonProperty ( "cells" ) ]
14+ public IEnumerable < IEnumerable < RichTextTextInput > > Cells { get ; set ; }
15+ }
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+
3+ namespace Notion . Client
4+ {
5+ public class TableUpdateBlock : UpdateBlock , IUpdateBlock
6+ {
7+ [ JsonProperty ( "table" ) ]
8+ public Info Table { get ; set ; }
9+
10+ public class Info
11+ {
12+ [ JsonProperty ( "has_column_header" ) ]
13+ public bool HasColumnHeader { get ; set ; }
14+
15+ [ JsonProperty ( "has_row_header" ) ]
16+ public bool HasRowHeader { get ; set ; }
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -91,6 +91,12 @@ public enum BlockType
9191 [ EnumMember ( Value = "synced_block" ) ]
9292 SyncedBlock ,
9393
94+ [ EnumMember ( Value = "table" ) ]
95+ Table ,
96+
97+ [ EnumMember ( Value = "table_row" ) ]
98+ TableRow ,
99+
94100 [ EnumMember ( Value = "unsupported" ) ]
95101 Unsupported
96102 }
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ namespace Notion.Client
2828 [ JsonSubtypes . KnownSubType ( typeof ( ParagraphBlock ) , BlockType . Paragraph ) ]
2929 [ JsonSubtypes . KnownSubType ( typeof ( PDFBlock ) , BlockType . PDF ) ]
3030 [ JsonSubtypes . KnownSubType ( typeof ( QuoteBlock ) , BlockType . Quote ) ]
31+ [ JsonSubtypes . KnownSubType ( typeof ( TableBlock ) , BlockType . Table ) ]
32+ [ JsonSubtypes . KnownSubType ( typeof ( TableRowBlock ) , BlockType . TableRow ) ]
3133 [ JsonSubtypes . KnownSubType ( typeof ( TableOfContentsBlock ) , BlockType . TableOfContents ) ]
3234 [ JsonSubtypes . KnownSubType ( typeof ( TemplateBlock ) , BlockType . Template ) ]
3335 [ JsonSubtypes . KnownSubType ( typeof ( ToDoBlock ) , BlockType . ToDo ) ]
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+
3+ namespace Notion . Client
4+ {
5+ public class TableBlock : Block , IColumnChildrenBlock , INonColumnBlock
6+ {
7+ public override BlockType Type => BlockType . Table ;
8+
9+ [ JsonProperty ( "table" ) ]
10+ public TableInfo Table { get ; set ; }
11+
12+ public class TableInfo
13+ {
14+ [ JsonProperty ( "table_width" ) ]
15+ public int TableWidth { get ; set ; }
16+
17+ [ JsonProperty ( "has_column_header" ) ]
18+ public bool HasColumnHeader { get ; set ; }
19+
20+ [ JsonProperty ( "has_row_header" ) ]
21+ public bool HasRowHeader { get ; set ; }
22+
23+ [ JsonProperty ( "children" ) ]
24+ public TableRowBlock Children { get ; set ; }
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using Newtonsoft . Json ;
3+
4+ namespace Notion . Client
5+ {
6+ public class TableRowBlock : Block , IColumnChildrenBlock , INonColumnBlock
7+ {
8+ public override BlockType Type => BlockType . TableRow ;
9+
10+ [ JsonProperty ( "table_row" ) ]
11+ public Info TableRow { get ; set ; }
12+
13+ public class Info
14+ {
15+ [ JsonProperty ( "cells" ) ]
16+ public IEnumerable < IEnumerable < RichTextText > > Cells { get ; set ; }
17+ }
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments