File tree Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ namespace Notion.Client
66 [ JsonConverter ( typeof ( JsonSubtypes ) , "type" ) ]
77 [ JsonSubtypes . KnownSubType ( typeof ( PageParent ) , ParentType . PageId ) ]
88 [ JsonSubtypes . KnownSubType ( typeof ( WorkspaceParent ) , ParentType . Workspace ) ]
9+ [ JsonSubtypes . KnownSubType ( typeof ( BlockParent ) , ParentType . BlockId ) ]
910 public interface IDatabaseParent : IParent
1011 {
1112 }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ namespace Notion.Client
77 [ JsonSubtypes . KnownSubType ( typeof ( DatabaseParent ) , ParentType . DatabaseId ) ]
88 [ JsonSubtypes . KnownSubType ( typeof ( PageParent ) , ParentType . PageId ) ]
99 [ JsonSubtypes . KnownSubType ( typeof ( WorkspaceParent ) , ParentType . Workspace ) ]
10+ [ JsonSubtypes . KnownSubType ( typeof ( BlockParent ) , ParentType . BlockId ) ]
1011 public interface IPageParent : IParent
1112 {
1213 }
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+
3+ namespace Notion . Client
4+ {
5+ public class BlockParent : IPageParent , IDatabaseParent
6+ {
7+ /// <summary>
8+ /// Always has a value "block_id"
9+ /// </summary>
10+ public ParentType Type { get ; set ; }
11+
12+ /// <summary>
13+ /// The ID of the block that the element belongs to.
14+ /// </summary>
15+ [ JsonProperty ( "block_id" ) ]
16+ public string BlockId { get ; set ; }
17+ }
18+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ public enum ParentType
1414 PageId ,
1515
1616 [ EnumMember ( Value = "workspace" ) ]
17- Workspace
17+ Workspace ,
18+
19+ [ EnumMember ( Value = "block_id" ) ]
20+ BlockId ,
1821 }
1922}
You can’t perform that action at this time.
0 commit comments