8000 Merge pull request #262 from notion-dotnet/242-rename-text-prop-to-ri… · notion-dotnet/notion-sdk-net@5c2970d · GitHub
[go: up one dir, main page]

Skip to content

Commit 5c2970d

Browse files
Merge pull request #262 from notion-dotnet/242-rename-text-prop-to-rich_text-in-block
Rename `text` property of blocks to `rich_text` 🚚
2 parents 9ca4c5e + 9f294d1 commit 5c2970d

34 files changed

+142
-104
lines changed

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/BookmarkUpdateBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public class BookmarkUpdateBlock : IUpdateBlock
88
public bool Archived { get; set; }
99

1010
[JsonProperty("bookmark")]
11-
public Data Bookmark { get; set; }
11+
public Info Bookmark { get; set; }
1212

13-
public class Data
13+
public class Info
1414
{
1515
[JsonProperty("url")]
1616
public string Url { get; set; }

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/BreadcrumbUpdateBlock.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public class BreadcrumbUpdateBlock : IUpdateBlock
77
public bool Archived { get; set; }
88

99
[JsonProperty("breadcrumb")]
10-
public Data Breadcrumb { get; set; }
10+
public Info Breadcrumb { get; set; }
1111

12-
public class Data
12+
public class Info
1313
{
1414
}
1515

1616
public BreadcrumbUpdateBlock()
1717
{
18-
Breadcrumb = new Data();
18+
Breadcrumb = new Info();
1919
}
2020
}
2121
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
using Newtonsoft.Json;
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
23

34
namespace Notion.Client
45
{
56
public class BulletedListItemUpdateBlock : UpdateBlock, IUpdateBlock
67
{
78
[JsonProperty("bulleted_list_item")]
8-
public TextContentUpdate BulletedListItem { get; set; }
9+
public Info BulletedListItem { get; set; }
10+
11+
public class Info
12+
{
13+
[JsonProperty("rich_text")]
14+
public IEnumerable<RichTextBaseInput> RichText { get; set; }
15+
}
916
}
1017
}

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/CalloutUpdateBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class CalloutUpdateBlock : UpdateBlock, IUpdateBlock
1010

1111
public class Info
1212
{
13-
[JsonProperty("text")]
14-
public IEnumerable<RichTextBaseInput> Text { get; set; }
13+
[JsonProperty("rich_text")]
14+
public IEnumerable<RichTextBaseInput> RichText { get; set; }
1515

1616
[JsonProperty("icon")]
1717
public IPageIcon Icon { get; set; }

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/CodeUpdateBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class CodeUpdateBlock : UpdateBlock, IUpdateBlock
1010

1111
public class Info
1212
{
13-
[JsonProperty("text")]
14-
public IEnumerable<RichTextBase> Text { get; set; }
13+
[JsonProperty("rich_text")]
14+
public IEnumerable<RichTextBase> RichText { get; set; }
1515

1616
[JsonProperty("language")]
1717
public string Language { get; set; }

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/DividerUpdateBlock.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public class DividerUpdateBlock : IUpdateBlock
77
public bool Archived { get; set; }
88

99
[JsonProperty("divider")]
10-
public Data Divider { get; set; }
10+
public Info Divider { get; set; }
1111

12-
public class Data
12+
public class Info
1313
{
1414
}
1515

1616
public DividerUpdateBlock()
1717
{
18-
Divider = new Data();
18+
Divider = new Info();
1919
}
2020
}
2121
}

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/EmbedUpdateBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ namespace Notion.Client
55
public class EmbedUpdateBlock : UpdateBlock, IUpdateBlock
66
{
77
[JsonProperty("embed")]
8-
public Data Embed { get; set; }
8+
public Info Embed { get; set; }
99

10-
public class Data
10+
public class Info
1111
{
1212
[JsonProperty("url")]
1313
public string Url { get; set; }

Src/Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/EquationUpdateBlock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ namespace Notion.Client
55
public class EquationUpdateBlock : UpdateBlock, IUpdateBlock
66
{
77
[JsonProperty("equation")]
8-
public Data Equation { get; set; }
8+
public Info Equation { get; set; }
99

10-
public class Data
10+
public class Info
1111
{
1212
[JsonProperty("expression")]
1313
public string Expression { get; set; }
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
using Newtonsoft.Json;
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
23

34
namespace Notion.Client
45
{
56
public class HeadingOneUpdateBlock : UpdateBlock, IUpdateBlock
67
{
78
[JsonProperty("heading_1")]
8-
public TextContentUpdate Heading_1 { get; set; }
9+
public Info Heading_1 { get; set; }
10+
11+
public class Info
12+
{
13+
[JsonProperty("rich_text")]
14+
public IEnumerable<RichTextBaseInput> RichText { get; set; }
15+
}
916
}
1017
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
using Newtonsoft.Json;
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
23

34
namespace Notion.Client
45
{
56
public class HeadingThreeeUpdateBlock : UpdateBlock, IUpdateBlock
67
{
78
[JsonProperty("heading_3")]
8-
public TextContentUpdate Heading_3 { get; set; }
9+
public Info Heading_3 { get; set; }
10+
11+
public class Info
12+
{
13+
[JsonProperty("rich_text")]
14+
public IEnumerable<RichTextBaseInput> RichText { get; set; }
15+
}
916
}
1017
}

0 commit comments

Comments
 (0)
0