Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve databases from a page #6

Open
alisongh opened this issue Jul 24, 2022 · 1 comment
Open

Retrieve databases from a page #6

alisongh opened this issue Jul 24, 2022 · 1 comment
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@alisongh
Copy link

Hello, I tried to use notion-database to retrieve data from my notion. My notion is a little bit complicated. The main page has several databases, each of which has several pages, and each of which has a database. I use find_all_pages to retrieve pages from the databases, but I want to know if I can retrieve databases from the pages and how. Thank you.

Here's the structure sample of my Notion database: Notion

@minwook-shin minwook-shin added help wanted Extra attention is needed question Further information is requested labels Jul 30, 2022
@minwook-shin
Copy link
Owner

minwook-shin commented Aug 1, 2022

def search_database(self, query: str, sort: SortType, root_only=True):
S.search_database(query="", sort={"direction": Direction.ascending, "timestamp": Timestamp.last_edited_time}, root_only=False)

Hello. @alisongh i didn't understand problem, but give you some code!
check the 'root_only' parameter of 'search_database' function.
Default value is True, try changing to False.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants