Skip to content

Commit 1141e10

Browse files
Rename BlockBase to Block 🚚
1 parent 141ce94 commit 1141e10

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

Src/Notion.Client/Api/Blocks/BlocksAppendChildrenParameters.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ namespace Notion.Client
55
// TODO: need an input version of Block
66
public interface IBlocksAppendChildrenBodyParameters
77
{
8-
IEnumerable<BlockBase> Children { get; set; }
8+
IEnumerable<Block> Children { get; set; }
99
}
1010

1111
public class BlocksAppendChildrenParameters : IBlocksAppendChildrenBodyParameters
1212
{
13-
public IEnumerable<BlockBase> Children { get; set; }
13+
public IEnumerable<Block> Children { get; set; }
1414
}
1515
}

Src/Notion.Client/Api/Blocks/BlocksClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace Notion.Client
77
{
88
public interface IBlocksClient
99
{
10-
Task<PaginatedList<BlockBase>> RetrieveChildrenAsync(string blockId, BlocksRetrieveChildrenParameters parameters = null);
11-
Task<BlockBase> AppendChildrenAsync(string blockId, BlocksAppendChildrenParameters parameters = null);
10+
Task<PaginatedList<Block>> RetrieveChildrenAsync(string blockId, BlocksRetrieveChildrenParameters parameters = null);
11+
Task<Block> AppendChildrenAsync(string blockId, BlocksAppendChildrenParameters parameters = null);
1212
}
1313

1414
public class BlocksClient : IBlocksClient
@@ -20,7 +20,7 @@ public BlocksClient(IRestClient client)
2020
_client = client;
2121
}
2222

23-
public async Task<PaginatedList<BlockBase>> RetrieveChildrenAsync(string blockId, BlocksRetrieveChildrenParameters parameters = null)
23+
public async Task<PaginatedList<Block>> RetrieveChildrenAsync(string blockId, BlocksRetrieveChildrenParameters parameters = null)
2424
{
2525
if (string.IsNullOrWhiteSpace(blockId))
2626
{
@@ -37,10 +37,10 @@ public async Task<PaginatedList<BlockBase>> RetrieveChildrenAsync(string blockId
3737
{ "page_size", queryParameters?.PageSize?.ToString() }
3838
};
3939

40-
return await _client.GetAsync<PaginatedList<BlockBase>>(url, queryParams);
40+
return await _client.GetAsync<PaginatedList<Block>>(url, queryParams);
4141
}
4242

43-
public async Task<BlockBase> AppendChildrenAsync(string blockId, BlocksAppendChildrenParameters parameters = null)
43+
public async Task<Block> AppendChildrenAsync(string blockId, BlocksAppendChildrenParameters parameters = null)
4444
{
4545
if (string.IsNullOrWhiteSpace(blockId))
4646
{
@@ -51,7 +51,7 @@ public async Task<BlockBase> AppendChildrenAsync(string blockId, BlocksAppendChi
5151

5252
var body = (IBlocksAppendChildrenBodyParameters)parameters;
5353

54-
return await _client.PatchAsync<BlockBase>(url, body);
54+
return await _client.PatchAsync<Block>(url, body);
5555
}
5656
}
5757
}

Src/Notion.Client/Models/Blocks/BlockBase.cs renamed to Src/Notion.Client/Models/Blocks/Block.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Notion.Client
1515
[JsonSubtypes.KnownSubType(typeof(ToDoBlock), BlockType.ToDo)]
1616
[JsonSubtypes.KnownSubType(typeof(ToggleBlock), BlockType.Toggle)]
1717
[JsonSubtypes.KnownSubType(typeof(UnsupportedBlock), BlockType.Unsupported)]
18-
public class BlockBase
18+
public class Block
1919
{
2020
public string Object => "block";
2121
public string Id { get; set; }

Src/Notion.Client/Models/Blocks/BulletedListItemBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Notion.Client
55
{
6-
public class BulletedListItemBlock : BlockBase
6+
public class BulletedListItemBlock : Block
77
{
88
public override BlockType Type => BlockType.BulletedListItem;
99

@@ -13,7 +13,7 @@ public class BulletedListItemBlock : BlockBase
1313
public class Info
1414
{
1515
public IEnumerable<RichTextBase> Text { get; set; }
16-
public IEnumerable<BlockBase> Children { get; set; }
16+
public IEnumerable<Block> Children { get; set; }
1717
}
1818
}
1919
}

Src/Notion.Client/Models/Blocks/ChildPageBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Notion.Client
44
{
5-
public class ChildPageBlock : BlockBase
5+
public class ChildPageBlock : Block
66
{
77
public override BlockType Type => BlockType.ChildPage;
88

Src/Notion.Client/Models/Blocks/HeadingOneBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Notion.Client
55
{
6-
public class HeadingOneBlock : BlockBase
6+
public class HeadingOneBlock : Block
77
{
88
public override BlockType Type => BlockType.Heading_1;
99

Src/Notion.Client/Models/Blocks/HeadingThreeeBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Notion.Client
55
{
6-
public class HeadingThreeeBlock : BlockBase
6+
public class HeadingThreeeBlock : Block
77
{
88
public override BlockType Type => BlockType.Heading_3;
99

Src/Notion.Client/Models/Blocks/HeadingTwoBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Notion.Client
55
{
6-
public class HeadingTwoBlock : BlockBase
6+
public class HeadingTwoBlock : Block
77
{
88
public override BlockType Type => BlockType.Heading_2;
99

Src/Notion.Client/Models/Blocks/NumberedListItemBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Notion.Client
55
{
6-
public class NumberedListItemBlock : BlockBase
6+
public class NumberedListItemBlock : Block
77
{
88
public override BlockType Type => BlockType.NumberedListItem;
99

@@ -13,7 +13,7 @@ public class NumberedListItemBlock : BlockBase
1313
public class Info
1414
{
1515
public IEnumerable<RichTextBase> Text { get; set; }
16-
public IEnumerable<BlockBase> Children { get; set; }
16+
public IEnumerable<Block> Children { get; set; }
1717
}
1818
}
1919
}

Src/Notion.Client/Models/Blocks/ParagraphBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Notion.Client
44
{
5-
public class ParagraphBlock : BlockBase
5+
public class ParagraphBlock : Block
66
{
77
public override BlockType Type => BlockType.Paragraph;
88

@@ -11,7 +11,7 @@ public class ParagraphBlock : BlockBase
1111
public class Info
1212
{
1313
public IEnumerable<RichTextBase> Text { get; set; }
14-
public IEnumerable<BlockBase> Children { get; set; }
14+
public IEnumerable<Block> Children { get; set; }
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)