@@ -33,14 +33,14 @@ public async Task AppendChildrenAsync_AppendsBlocksGivenBlocks()
3333 new BlockAppendChildrenRequest
3434 {
3535 BlockId = _page . Id ,
36- Children = new List < IBlock >
36+ Children = new List < IBlockObjectRequest >
3737 {
38- new BreadcrumbBlock { Breadcrumb = new BreadcrumbBlock . Data ( ) } ,
39- new DividerBlock { Divider = new DividerBlock . Data ( ) } ,
40- new TableOfContentsBlock { TableOfContents = new TableOfContentsBlock . Data ( ) } ,
41- new CalloutBlock
38+ new BreadcrumbBlockRequest { Breadcrumb = new BreadcrumbBlockRequest . Data ( ) } ,
39+ new DividerBlockRequest { Divider = new DividerBlockRequest . Data ( ) } ,
40+ new TableOfContentsBlockRequest { TableOfContents = new TableOfContentsBlockRequest . Data ( ) } ,
41+ new CalloutBlockRequest
4242 {
43- Callout = new CalloutBlock . Info
43+ Callout = new CalloutBlockRequest . Info
4444 {
4545 RichText = new List < RichTextBaseInput >
4646 {
@@ -62,7 +62,10 @@ public async Task UpdateBlockAsync_UpdatesGivenBlock()
6262 new BlockAppendChildrenRequest
6363 {
6464 BlockId = _page . Id ,
65- Children = new List < IBlock > { new BreadcrumbBlock { Breadcrumb = new BreadcrumbBlock . Data ( ) } }
65+ Children = new List < IBlockObjectRequest >
66+ {
67+ new BreadcrumbBlockRequest { Breadcrumb = new BreadcrumbBlockRequest . Data ( ) }
68+ }
6669 }
6770 ) ;
6871
@@ -82,10 +85,10 @@ public async Task DeleteAsync_DeleteBlockWithGivenId()
8285 new BlockAppendChildrenRequest
8386 {
8487 BlockId = _page . Id ,
85- Children = new List < IBlock >
88+ Children = new List < IBlockObjectRequest >
8689 {
87- new DividerBlock { Divider = new DividerBlock . Data ( ) } ,
88- new TableOfContentsBlock { TableOfContents = new TableOfContentsBlock . Data ( ) }
90+ new DividerBlockRequest { Divider = new DividerBlockRequest . Data ( ) } ,
91+ new TableOfContentsBlockRequest { TableOfContents = new TableOfContentsBlockRequest . Data ( ) }
8992 }
9093 }
9194 ) ;
@@ -96,13 +99,13 @@ public async Task DeleteAsync_DeleteBlockWithGivenId()
9699 [ Theory ]
97100 [ MemberData ( nameof ( BlockData ) ) ]
98101 public async Task UpdateAsync_UpdatesGivenBlock (
99- IBlock block , IUpdateBlock updateBlock , Action < IBlock , INotionClient > assert )
102+ IBlockObjectRequest block , IUpdateBlock updateBlock , Action < IBlock , INotionClient > assert )
100103 {
101104 var blocks = await Client . Blocks . AppendChildrenAsync (
102105 new BlockAppendChildrenRequest
103106 {
104107 BlockId = _page . Id ,
105- Children = new List < IBlock > { block }
108+ Children = new List < IBlockObjectRequest > { block }
106109 }
107110 ) ;
108111
@@ -125,9 +128,9 @@ private static IEnumerable<object[]> BlockData()
125128 {
126129 new object [ ]
127130 {
128- new BookmarkBlock
131+ new BookmarkBlockRequest
129132 {
130- Bookmark = new BookmarkBlock . Info
133+ Bookmark = new BookmarkBlockRequest . Info
131134 {
132135 Url = "https://developers.notion.com/reference/rich-text" ,
133136 Caption = new List < RichTextBase >
@@ -156,7 +159,7 @@ private static IEnumerable<object[]> BlockData()
156159 } ,
157160 new object [ ]
158161 {
159- new EquationBlock { Equation = new EquationBlock . Info { Expression = "e=mc^3" } } ,
162+ new EquationBlockRequest { Equation = new EquationBlockRequest . Info { Expression = "e=mc^3" } } ,
160163 new EquationUpdateBlock { Equation = new EquationUpdateBlock . Info { Expression = "e=mc^2" } } ,
161164 new Action < IBlock , INotionClient > ( ( block , _ ) =>
162165 {
@@ -166,7 +169,7 @@ private static IEnumerable<object[]> BlockData()
166169 } ,
167170 new object [ ]
168171 {
169- new DividerBlock { Divider = new DividerBlock . Data ( ) } , new DividerUpdateBlock ( ) ,
172+ new DividerBlockRequest { Divider = new DividerBlockRequest . Data ( ) } , new DividerUpdateBlock ( ) ,
170173 new Action < IBlock , INotionClient > ( ( block , client ) =>
171174 {
172175 Assert . NotNull ( block ) ;
@@ -175,7 +178,7 @@ private static IEnumerable<object[]> BlockData()
175178 } ,
176179 new object [ ]
177180 {
178- new AudioBlock
181+ new AudioBlockRequest
179182 {
180183 Audio = new ExternalFile
181184 {
@@ -206,7 +209,7 @@ private static IEnumerable<object[]> BlockData()
206209 } ,
207210 new object [ ]
208211 {
209- new TableOfContentsBlock { TableOfContents = new TableOfContentsBlock . Data ( ) } ,
212+ new TableOfContentsBlockRequest { TableOfContents = new TableOfContentsBlockRequest . Data ( ) } ,
210213 new TableOfContentsUpdateBlock ( ) , new Action < IBlock , INotionClient > ( ( block , client ) =>
211214 {
212215 Assert . NotNull ( block ) ;
@@ -215,9 +218,9 @@ private static IEnumerable<object[]> BlockData()
215218 } ,
216219 new object [ ]
217220 {
218- new CalloutBlock
221+ new CalloutBlockRequest
219222 {
220- Callout = new CalloutBlock . Info
223+ Callout = new CalloutBlockRequest . Info
221224 {
222225 RichText = new List < RichTextBaseInput >
223226 {
@@ -245,9 +248,9 @@ private static IEnumerable<object[]> BlockData()
245248 } ,
246249 new object [ ]
247250 {
248- new QuoteBlock
251+ new QuoteBlockRequest
249252 {
250- Quote = new QuoteBlock . Info
253+ Quote = new QuoteBlockRequest . Info
251254 {
252255 RichText = new List < RichTextBaseInput >
253256 {
@@ -275,7 +278,7 @@ private static IEnumerable<object[]> BlockData()
275278 } ,
276279 new object [ ]
277280 {
278- new ImageBlock
281+ new ImageBlockRequest
279282 {
280283 Image = new ExternalFile
281284 {
@@ -308,9 +311,9 @@ private static IEnumerable<object[]> BlockData()
308311 } ,
309312 new object [ ]
310313 {
311- new EmbedBlock
314+ new EmbedBlockRequest
312315 {
313- Embed = new EmbedBlock . Info
316+ Embed = new EmbedBlockRequest . Info
314317 {
315318 Url = "https://zephoria.com/wp-content/uploads/2014/08/online-community.jpg"
316319 }
@@ -333,7 +336,7 @@ private static IEnumerable<object[]> BlockData()
333336 } ,
334337 new object [ ]
335338 {
336- new LinkToPageBlock
339+ new LinkToPageBlockRequest
337340 {
338341 LinkToPage = new PageParent
339342 {
@@ -359,16 +362,16 @@ private static IEnumerable<object[]> BlockData()
359362 } ,
360363 new object [ ]
361364 {
362- new TableBlock
365+ new TableBlockRequest
363366 {
364- Table = new TableBlock . Info
367+ Table = new TableBlockRequest . Info
365368 {
366369 TableWidth = 1 ,
367370 Children = new [ ]
368371 {
369- new TableRowBlock
372+ new TableRowBlockRequest
370373 {
371- TableRow = new TableRowBlock . Info
374+ TableRow = new TableRowBlockRequest . Info
372375 {
373376 Cells = new [ ]
374377 {
0 commit comments