notion-dotnet / notion-sdk-net

A Notion SDK for .Net
MIT License
177 stars 42 forks source link

Deprecated API: client.Databases.RetrieveAsync #405

Open matkoch opened 8 months ago

matkoch commented 8 months ago

Describe the bug API was deprecated

To Reproduce

var notionClient = NotionClientFactory.Create(new ClientOptions
            {
                AuthToken = "accessToken"
            }
var database = await notionClient.Databases.RetrieveAsync("");

Expected behavior Getting information about the database.

KoditkarVedant commented 7 months ago

@matkoch would you like to contribute? I would be happy to accept the PR.

Kuzmanov commented 2 months ago

Since it's not possible to get all databases from the databases endpoint, and it requires an Id, I think it makes sense to throw an ArgumentNullException when databaseId is not provided.

As an alternative, Notion suggests using the Search API