You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to update a To-do block and I've done so successfully but I'm struggling to assign RichText an actual value and understand the code/why the RichText property is an IEnumerable?
ToDoUpdateBlock requestParams = new ToDoUpdateBlock()
{
ToDo = new ToDoUpdateBlock.Info()
{
RichText = Enumerable.Empty<RichTextBaseInput>(),
IsChecked = true
}
};
NotionClient.Blocks.UpdateAsync(blockID, requestParams);
This code works but I don't understand how I'm supposed to use the RichText property. It's an IEnumerable but when I create a list of RichTextBaseInput like below I get an error from the API
ToDo = new ToDoUpdateBlock.Info()
{
RichText = new List<RichTextBaseInput>() { new RichTextBaseInput()
{
PlainText = "shouldn't this work?"
}},
IsChecked = true
}
Thank you.
The text was updated successfully, but these errors were encountered:
chinnuu05
changed the title
Why is the RichText property an IEnumerable? How am I supposed to implement this?
Why is the RichText property an IEnumerable?
Sep 21, 2023
I'm trying to update a To-do block and I've done so successfully but I'm struggling to assign RichText an actual value and understand the code/why the RichText property is an IEnumerable?
This code works but I don't understand how I'm supposed to use the RichText property. It's an IEnumerable but when I create a list of RichTextBaseInput like below I get an error from the API
Thank you.
The text was updated successfully, but these errors were encountered: