notion-client ライブラリを使用して Notion データベースの行を取得する Python コードがあります。コードはすべての行を取得できますが、順序が間違っています。API リファレンスからSort オブジェクトを見ましたが、それを使用して、notion.so に表示されている正確な順序で行を返す方法を理解できませんでした。問題のスニペットは次のとおりです。
from notion_client import Client
notion = Client(auth=NOTION_API_TOKEN)
result = notion.databases.query(database_id='...')
for row in result['results']:
title = row['properties']['NAME_OF_PROPERTY']['title']
if len(title) == 0:
print('')
else:
print(title[0]['plain_text'])
私は何が欠けていますか?