File tree Expand file tree Collapse file tree 5 files changed +23
-4
lines changed Expand file tree Collapse file tree 5 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ namespace Notion.Client
1717 [ JsonSubtypes . KnownSubType ( typeof ( UnsupportedBlock ) , BlockType . Unsupported ) ]
1818 public class Block
1919 {
20- public string Object => "block" ;
20+ public ObjectType Object => ObjectType . Block ;
2121 public string Id { get ; set ; }
2222
2323 [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Notion.Client
66{
77 public class Database
88 {
9- public string Object => "database" ;
9+ public ObjectType Object => ObjectType . Database ;
1010 public string Id { get ; set ; }
1111
1212 [ JsonProperty ( "created_time" ) ]
Original file line number Diff line number Diff line change 1+ using System . Runtime . Serialization ;
2+
3+ namespace Notion . Client
4+ {
5+ public enum ObjectType
6+ {
7+ [ EnumMember ( Value = "page" ) ]
8+ Page ,
9+
10+ [ EnumMember ( Value = "database" ) ]
11+ Database ,
12+
13+ [ EnumMember ( Value = "block" ) ]
14+ Block ,
15+
16+ [ EnumMember ( Value = "user" ) ]
17+ User ,
18+ }
19+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Notion.Client
66{
77 public class Page
88 {
9- public string Object => "page" ;
9+ public ObjectType Object => ObjectType . Page ;
1010 public string Id { get ; set ; }
1111 public Parent Parent { get ; set ; }
1212
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ namespace Notion.Client
44{
55 public class User
66 {
7- public string Object => "user" ;
7+ public ObjectType Object => ObjectType . User ;
88 public string Id { get ; set ; }
99 public string Type { get ; set ; }
1010 public string Name { get ; set ; }
You can’t perform that action at this time.
0 commit comments