Skip to content

Commit

Permalink
Merge pull request #174 from notion-dotnet/feature/171-add-support-to…
Browse files Browse the repository at this point in the history
…-pass-archive-property-when-updating-a-block

Add support to archive a block in update block API ✨
  • Loading branch information
KoditkarVedant authored Oct 7, 2021
2 parents 525cd19 + a6be862 commit 4605da3
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class BulletedListItemUpdateBlock : IUpdateBlock
public class BulletedListItemUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("bulleted_list_item")]
public TextContentUpdate BulletedListItem { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Notion.Client
{
public class CodeUpdateBlock : IUpdateBlock
public class CodeUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("code")]
public Info Code { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class HeadingOneUpdateBlock : IUpdateBlock
public class HeadingOneUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("heading_1")]
public TextContentUpdate Heading_1 { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class HeadingThreeeUpdateBlock : IUpdateBlock
public class HeadingThreeeUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("heading_3")]
public TextContentUpdate Heading_3 { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class HeadingTwoUpdateBlock : IUpdateBlock
public class HeadingTwoUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("heading_2")]
public TextContentUpdate Heading_2 { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
namespace Notion.Client
using Newtonsoft.Json;

namespace Notion.Client
{
public interface IUpdateBlock
{
[JsonProperty("archived")]
bool Archived { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class NumberedListItemUpdateBlock : IUpdateBlock
public class NumberedListItemUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("numbered_list_item")]
public TextContentUpdate NumberedListItem { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class ParagraphUpdateBlock : IUpdateBlock
public class ParagraphUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("paragraph")]
public TextContentUpdate Paragraph { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Notion.Client
{
public class ToDoUpdateBlock : IUpdateBlock
public class ToDoUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("to_do")]
public Info ToDo { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Notion.Client
{
public class ToggleUpdateBlock : IUpdateBlock
public class ToggleUpdateBlock : UpdateBlock, IUpdateBlock
{
[JsonProperty("toggle")]
public TextContentUpdate Toggle { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Notion.Client
{
public abstract class UpdateBlock : IUpdateBlock
{
public bool Archived { get; set; }
}
}

0 comments on commit 4605da3

Please sign in to comment.