Skip to content

Commit 97b2983

Browse files
Merge pull request #307 from notion-dotnet/259-fix-block-parent-parsing
Fix Block parent parsing 🔨
2 parents f2901a8 + f2d0781 commit 97b2983

File tree

7 files changed

+6
-8
lines changed

7 files changed

+6
-8
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using Notion.Client.Models.Blocks;
32

43
namespace Notion.Client
54
{

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using JsonSubTypes;
22
using Newtonsoft.Json;
33
using Newtonsoft.Json.Converters;
4-
using Notion.Client.Models.Blocks;
54

65
namespace Notion.Client
76
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
using JsonSubTypes;
22
using Newtonsoft.Json;
33

4-
namespace Notion.Client.Models.Blocks
4+
namespace Notion.Client
55
{
66
[JsonConverter(typeof(JsonSubtypes), "type")]
77
[JsonSubtypes.KnownSubType(typeof(DatabaseParent), ParentType.DatabaseId)]
88
[JsonSubtypes.KnownSubType(typeof(PageParent), ParentType.PageId)]
99
[JsonSubtypes.KnownSubType(typeof(WorkspaceParent), ParentType.Workspace)]
1010
[JsonSubtypes.KnownSubType(typeof(BlockParent), ParentType.BlockId)]
11-
public interface IBlockParent
11+
public interface IBlockParent : IParent
1212
{
1313
}
1414
}

Src/Notion.Client/Models/Parents/BlockParent.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 BlockParent : IPageParent, IDatabaseParent
5+
public class BlockParent : IPageParent, IDatabaseParent, IBlockParent
66
{
77
/// <summary>
88
/// Always has a value "block_id"

Src/Notion.Client/Models/Parents/DatabaseParent.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 DatabaseParent : IPageParent
5+
public class DatabaseParent : IPageParent, IBlockParent
66
{
77
/// <summary>
88
/// Always "database_id"

Src/Notion.Client/Models/Parents/PageParent.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 PageParent : IPageParent, IDatabaseParent
5+
public class PageParent : IPageParent, IDatabaseParent, IBlockParent
66
{
77
/// <summary>
88
/// Always "page_id".

Src/Notion.Client/Models/Parents/WorkspaceParent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace Notion.Client
22
{
3-
public class WorkspaceParent : IPageParent, IDatabaseParent
3+
public class WorkspaceParent : IPageParent, IDatabaseParent, IBlockParent
44
{
55
/// <summary>
66
/// Always "workspace".

0 commit comments

Comments
 (0)