-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from notion-dotnet/208-add-support-for-synced…
…-block Add support for Syncedblock type ✨
- Loading branch information
Showing
5 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
...n.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/AudioUpdateBlock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
|
22 changes: 22 additions & 0 deletions
22
...nt/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/SyncedBlockUpdateBlock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class SyncedBlockUpdateBlock : UpdateBlock, IUpdateBlock | ||
{ | ||
[JsonProperty("synced_block")] | ||
public Data SyncedBlock { get; set; } | ||
|
||
public class Data | ||
{ | ||
[JsonProperty("synced_from")] | ||
public SyncedFromBlockId SyncedFrom { get; set; } | ||
|
||
public class SyncedFromBlockId | ||
{ | ||
[JsonProperty("block_id")] | ||
public string BlockId { get; set; } | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class SyncedBlockBlock : Block, IColumnChildrenBlock, INonColumnBlock | ||
{ | ||
public override BlockType Type => BlockType.SyncedBlock; | ||
|
||
[JsonProperty("synced_block")] | ||
public Data SyncedBlock { get; set; } | ||
|
||
public class Data | ||
{ | ||
[JsonProperty("synced_from")] | ||
public SyncedFromBlockId SyncedFrom { get; set; } | ||
|
||
[JsonProperty("children")] | ||
public IEnumerable<ISyncedBlockChildren> Children { get; set; } | ||
|
||
public class SyncedFromBlockId | ||
{ | ||
[JsonProperty("type")] | ||
public string Type { get; set; } | ||
|
||
[JsonProperty("block_id")] | ||
public string BlockId { get; set; } | ||
} | ||
} | ||
} | ||
} |