Helpers
Utility functions for notion-sdk-py.
async_collect_paginated_api(function, **kwargs)
async
Collect asynchronously all the results of paginating an API into a list.
Source code in notion_client/helpers.py
74 75 76 77 78 |
|
async_iterate_paginated_api(function, **kwargs)
async
Return an async iterator over the results of any paginated Notion API.
Source code in notion_client/helpers.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
collect_paginated_api(function, **kwargs)
Collect all the results of paginating an API into a list.
Source code in notion_client/helpers.py
53 54 55 |
|
get_id(url)
Return the id of the object behind the given URL.
Source code in notion_client/helpers.py
25 26 27 28 29 30 31 32 33 34 |
|
get_url(object_id)
Return the URL for the object with the given id.
Source code in notion_client/helpers.py
20 21 22 |
|
is_equation_rich_text_item_response(rich_text)
Return True
if rich_text
is an equation.
Source code in notion_client/helpers.py
118 119 120 |
|
is_full_block(response)
Return True
if response is a full block.
Source code in notion_client/helpers.py
81 82 83 |
|
is_full_comment(response)
Return True
if response is a full comment.
Source code in notion_client/helpers.py
108 109 110 |
|
is_full_database(response)
Return True
if response is a full database.
Source code in notion_client/helpers.py
91 92 93 |
|
is_full_page(response)
Return True
if response is a full page.
Source code in notion_client/helpers.py
86 87 88 |
|
is_full_page_or_database(response)
Return True
if response
is a full database or a full page.
Source code in notion_client/helpers.py
96 97 98 99 100 |
|
is_full_user(response)
Return True
if response is a full user.
Source code in notion_client/helpers.py
103 104 105 |
|
is_mention_rich_text_item_response(rich_text)
Return True
if rich_text
is a mention.
Source code in notion_client/helpers.py
123 124 125 |
|
is_text_rich_text_item_response(rich_text)
Return True
if rich_text
is a text.
Source code in notion_client/helpers.py
113 114 115 |
|
iterate_paginated_api(function, **kwargs)
Return an iterator over the results of any paginated Notion API.
Source code in notion_client/helpers.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
pick(base, *keys)
Return a dict composed of key value pairs for keys passed as args.
Source code in notion_client/helpers.py
7 8 9 10 11 12 13 14 15 16 17 |
|