如何获取概念页面的图标?

How can I get the icon of a notion page?

根据Notion Public API官方文档,我可以检索到一个概念页面。 但是这个Page Object不包括页面的Icon。图标通常是一个 unicode 字符(例如 \u2708\ufe0f 表示 ✈️)。我习惯于使用 notion-py(python 的非官方概念 api 客户端)获取这些信息。

如何使用 public API 检索此信息?

在API的当前版本中(概念版本:2021-05-13)不支持此功能。页面对象没有页面图标或横幅图像字段。这可能会出现在 API 的未来迭代中,因为它仍处于 public 测试版。

这看起来是可行的,正如博客 post、https://developers.notion.com/changelog/page-icons-cover-images-new-block-types-and-improved-page-file-properties

中所述

Page Icons and Cover Images

When fetching a Page object or a Database object, the response will now include an icon and cover property, as shown below:

{
    "object": "database",
    "id": "96433ad8-3fbe-460f-a007-72311c4aa804",
    "cover": {
        "type": "external",
        "external": {
            "url": "https://website.domain/images/image.png"
        }
    },
    "icon": {
        "type": "emoji",
        "emoji": ""
    },
    // ... remaining properties
}