Skip to content

Commit 3e14793

Browse files
Add readonly Status property
1 parent 08c8ddb commit 3e14793

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace Notion.Client
2222
[JsonSubtypes.KnownSubType(typeof(RichTextProperty), PropertyType.RichText)]
2323
[JsonSubtypes.KnownSubType(typeof(RollupProperty), PropertyType.Rollup)]
2424
[JsonSubtypes.KnownSubType(typeof(SelectProperty), PropertyType.Select)]
25+
[JsonSubtypes.KnownSubType(typeof(StatusProperty), PropertyType.Status)]
2526
[JsonSubtypes.KnownSubType(typeof(TitleProperty), PropertyType.Title)]
2627
[JsonSubtypes.KnownSubType(typeof(UrlProperty), PropertyType.Url)]
2728
public class Property

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public enum PropertyType
6262
LastEditedBy,
6363

6464
[EnumMember(Value = "last_edited_time")]
65-
LastEditedTime
65+
LastEditedTime,
66+
67+
[EnumMember(Value = "status")]
68+
Status,
6669
}
6770
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Collections.Generic;
2+
using Newtonsoft.Json;
3+
4+
namespace Notion.Client
5+
{
6+
public class StatusProperty : Property
7+
{
8+
public override PropertyType Type => PropertyType.Status;
9+
10+
[JsonProperty("status")]
11+
public Dictionary<string, object> Status { get; set; }
12+
}
13+
}

0 commit comments

Comments
 (0)