Open pratyakshs opened 4 years ago
I think this should do the trick:
space = client.get_space(SPACE_ID)
# Get the IDs of the pages in that space
pages = space.pages
I have no clue how to get the ID of a space though.
I have no clue how to get the ID of a space though.
You can do so by opening the developer console. When you switch from a space to another, you'll get 3 messages about analyticsHelpers: forceOverrideMismatch
.
The first one is about the page_id
, the second one is about the spaceId
(this is the one you want)and the third one is about the pageVisitedId
The spaceId
that is displayed is the one you just leaved.
The Notion app has three main headings on the left side-panel: Workspace, Shared, and Private. I'm able to get all the pages in Workspace and Private by calling
client.get_top_level_pages()
. However, it does not return any pages that are under the Shared heading. Is there a way to fetch these?