Skip to content

Commit 4a1bcce

Browse files
Merge pull request #417 from kosaku-hayashi/issue-410-Archived-property-is-getting-deprecated
Removed 'archived' property and added 'in_trash' property.
2 parents 4197ea8 + 0199b61 commit 4a1bcce

36 files changed

+61
-53
lines changed

Src/Notion.Client/Api/Blocks/IBlocksClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Task<AppendChildrenResponse> AppendChildrenAsync(
4747
);
4848

4949
/// <summary>
50-
/// Sets a Block object, including page blocks, to archived: true using the ID specified.
50+
/// Moves a Block object, including page blocks, to the trash: true using the ID specified.
5151
/// </summary>
5252
/// <param name="blockId">Identifier for a Notion block</param>
5353
Task DeleteAsync(string blockId, CancellationToken cancellationToken = default);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class BookmarkUpdateBlock : IUpdateBlock
88
[JsonProperty("bookmark")]
99
public Info Bookmark { get; set; }
1010

11-
public bool Archived { get; set; }
11+
public bool InTrash { get; set; }
1212

1313
public class Info
1414
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public BreadcrumbUpdateBlock()
1212
[JsonProperty("breadcrumb")]
1313
public Info Breadcrumb { get; set; }
1414

15-
public bool Archived { get; set; }
15+
public bool InTrash { get; set; }
1616

1717
public class Info
1818
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public DividerUpdateBlock()
1212
[JsonProperty("divider")]
1313
public Info Divider { get; set; }
1414

15-
public bool Archived { get; set; }
15+
public bool InTrash { get; set; }
1616

1717
public class Info
1818
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Notion.Client
44
{
55
public interface IUpdateBlock
66
{
7-
[JsonProperty("archived")]
8-
bool Archived { get; set; }
7+
[JsonProperty("in_trash")]
8+
bool InTrash { get; set; }
99
}
1010
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public TableOfContentsUpdateBlock()
1212
[JsonProperty("table_of_contents")]
1313
public Info TableOfContents { get; set; }
1414

15-
public bool Archived { get; set; }
15+
public bool InTrash { get; set; }
1616

1717
public class Info
1818
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
public abstract class UpdateBlock : IUpdateBlock
44
{
5-
public bool Archived { get; set; }
5+
public bool InTrash { get; set; }
66
}
77
}

Src/Notion.Client/Api/Databases/RequestParams/DatabasesUpdateParameters/DatabasesUpdateParameters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class DatabasesUpdateParameters : IDatabasesUpdateBodyParameters
1212

1313
public FileObject Cover { get; set; }
1414

15-
public bool Archived { get; set; }
15+
public bool InTrash { get; set; }
1616

1717
public bool? IsInline { get; set; }
1818

Src/Notion.Client/Api/Databases/RequestParams/DatabasesUpdateParameters/IDatabasesUpdateBodyParameters.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public interface IDatabasesUpdateBodyParameters
1717
[JsonProperty("cover")]
1818
FileObject Cover { get; set; }
1919

20-
[JsonProperty("archived")]
21-
bool Archived { get; set; }
20+
[JsonProperty("in_trash")]
21+
bool InTrash { get; set; }
2222

2323
[JsonProperty("is_inline")]
2424
bool? IsInline { get; set; }

Src/Notion.Client/Api/Pages/RequestParams/IPagesUpdateBodyParameters.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ namespace Notion.Client
55
{
66
public interface IPagesUpdateBodyParameters
77
{
8-
[JsonProperty("archived")]
9-
bool Archived { get; set; }
8+
[JsonProperty("in_trash")]
9+
bool InTrash { get; set; }
1010

1111
[JsonProperty("properties")]
1212
IDictionary<string, PropertyValue> Properties { get; set; }

0 commit comments

Comments
 (0)