Skip to content

Commit

Permalink
Merge pull request #87 from jamalex/50
Browse files Browse the repository at this point in the history
Add client.get_top_level_pages method
  • Loading branch information
jamalex committed Jan 3, 2020
2 parents bfbb766 + 1d00c7a commit f195ff3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions notion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ def _update_user_info(self):
self._store.store_recordmap(records)
self.current_user = self.get_user(list(records["notion_user"].keys())[0])
self.current_space = self.get_space(list(records["space"].keys())[0])
return records

def get_top_level_pages(self):
records = self._update_user_info()
return [self.get_block(bid) for bid in records["block"].keys()]

def get_record_data(self, table, id, force_refresh=False):
return self._store.get(table, id, force_refresh=force_refresh)
Expand Down

0 comments on commit f195ff3

Please sign in to comment.