Add methods for modfifing pages and blocks#59
Open
dmweis wants to merge 9 commits intojakeswenson:mainfrom
Open
Add methods for modfifing pages and blocks#59dmweis wants to merge 9 commits intojakeswenson:mainfrom
dmweis wants to merge 9 commits intojakeswenson:mainfrom
Conversation
|
Any news of this? |
Author
Sorry, not sure if you are asking me? I think this is waiting for input from a reviewer. |
|
been a while now, hope the project owner can get back to it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey!
This is a larger PR because it wasn't originally meant to be a single PR. I was trying to use your library for something and I couldn't figure out how to modify things so I forked it and ended up making multiple changes.
Together thought they effectively add an API for modifying pages and blocks which as far as I could tell originally wansn't possible. So they might make sense as a signgle PR.
Let me know what you think. If you like all of it I am happy to do some changes, add tests,... whatever else. But if you think only some subsets of this PR should be considered please let me know and I am happy to break it up into separate PRs.
Individual things done:
update_pageto update contents of an existing pageget_blockget block by block id (which can be a page id as pages are also blocks as far as contents are concerned?)get_block_children_with_cursorwhich lets you iterate over children of a block. I wans't sure how to use the existing cursor to iterate without thisappend_block_childrenwhich allows user to attach more block under a block or a pagedelete_blockwhich is pretty self explanatoryupdate_blockwhich is useful for doing things like changing text content or status of a checkbox but can't do things like change block typesPageableforSearchRequestbecause I couldn't figure out how to page over results of a serach for pagesLastly I also changed some API types by adding
skip_serializing_ifon None, Default, or Clone. This was all just to make working with them easier and because I think we were generating json that notion wasn't happy in some cases.Thanks!