Getting the value of a List property #107
-
Hello, I am trying to make a small application to print into the console whenever a page in my notion is edited. This is mainly to try out the API so I can make something more useful later on. I am stuck on trying to get the value of a property, In my database on notion I have the property "Taak". This property is a text property and I want to print it in the console. I can't seem to find the way to get just the text from this property though, I often get Notion.Client.TitlePropertyValue or the string "Title". Below are 2 of the things I tried |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@KevinDaGame I see what you are doing wrong. The problem you are getting is that the You need to write some method to extract the value out. example.
|
Beta Was this translation helpful? Give feedback.
@KevinDaGame I see what you are doing wrong. The problem you are getting is that the
Console.WriteLine
is printing theType
of the data instead of the value that is becauseConsole.WriteLine
try to convert the value of any type into string but there is no overload ofToString()
method defined for the custom typeNotion.Client.TitlePropertyValue
(or for any PropertyValue type).You need to write some method to extract the value out.
example.