Skip to content

Commit 8820edb

Browse files
Merge pull request #279 from notion-dotnet/250-add-archived-property-for-database-object
Add archived property to database object ✨
2 parents 9e82c64 + 65068d2 commit 8820edb

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed
Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
using System.Collections.Generic;
2-
using Newtonsoft.Json;
32

43
namespace Notion.Client
54
{
6-
public interface IDatabasesUpdateBodyParameters
7-
{
8-
[JsonProperty("properties")]
9-
Dictionary<string, IUpdatePropertySchema> Properties { get; set; }
10-
11-
[JsonProperty("title")]
12-
List<RichTextBaseInput> Title { get; set; }
13-
14-
[JsonProperty("icon")]
15-
IPageIcon Icon { get; set; }
16-
17-
[JsonProperty("cover")]
18-
FileObject Cover { get; set; }
19-
}
20-
215
public class DatabasesUpdateParameters : IDatabasesUpdateBodyParameters
226
{
237
public Dictionary<string, IUpdatePropertySchema> Properties { get; set; }
8+
249
public List<RichTextBaseInput> Title { get; set; }
10+
2511
public IPageIcon Icon { get; set; }
12+
2613
public FileObject Cover { get; set; }
14+
15+
public bool Archived { get; set; }
2716
}
2817
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace Notion.Client
5+
{
6+
public interface IDatabasesUpdateBodyParameters
7+
{
8+
[JsonProperty("properties")]
9+
Dictionary<string, IUpdatePropertySchema> Properties { get; set; }
10+
11+
[JsonProperty("title")]
12+
List<RichTextBaseInput> Title { get; set; }
13+
14+
[JsonProperty("icon")]
15+
IPageIcon Icon { get; set; }
16+
17+
[JsonProperty("cover")]
18+
FileObject Cover { get; set; }
19+
20+
[JsonProperty("archived")]
21+
bool Archived { get; set; }
22+
}
23+
}

Src/Notion.Client/Models/Database/Database.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,11 @@ public class Database : IObject
3636
/// </summary>
3737
[JsonProperty("url")]
3838
public string Url { get; set; }
39+
40+
/// <summary>
41+
/// The archived status of the database.
42+
/// </summary>
43+
[JsonProperty("archived")]
44+
public bool Archived { get; set; }
3945
}
4046
}

0 commit comments

Comments
 (0)