notion-sdk-net icon indicating copy to clipboard operation
notion-sdk-net copied to clipboard

Deprecated API: client.Databases.RetrieveAsync

Open matkoch opened this issue 1 year ago • 2 comments

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.

matkoch avatar Nov 13 '23 23:11 matkoch

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

KoditkarVedant avatar Dec 14 '23 09:12 KoditkarVedant

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

Kuzmanov avatar Apr 27 '24 13:04 Kuzmanov