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
75 76 77 78 79 |
|
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
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
collect_paginated_api(function, **kwargs)
Collect all the results of paginating an API into a list.
Source code in notion_client/helpers.py
54 55 56 |
|
get_id(url)
Return the id of the object behind the given URL.
Source code in notion_client/helpers.py
26 27 28 29 30 31 32 33 34 35 |
|
get_url(object_id)
Return the URL for the object with the given id.
Source code in notion_client/helpers.py
21 22 23 |
|
is_equation_rich_text_item_response(rich_text)
Return True
if rich_text
is an equation.
Source code in notion_client/helpers.py
119 120 121 |
|
is_full_block(response)
Return True
if response is a full block.
Source code in notion_client/helpers.py
82 83 84 |
|
is_full_comment(response)
Return True
if response is a full comment.
Source code in notion_client/helpers.py
109 110 111 |
|
is_full_database(response)
Return True
if response is a full database.
Source code in notion_client/helpers.py
92 93 94 |
|
is_full_page(response)
Return True
if response is a full page.
Source code in notion_client/helpers.py
87 88 89 |
|
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
97 98 99 100 101 |
|
is_full_user(response)
Return True
if response is a full user.
Source code in notion_client/helpers.py
104 105 106 |
|
is_mention_rich_text_item_response(rich_text)
Return True
if rich_text
is a mention.
Source code in notion_client/helpers.py
124 125 126 |
|
is_text_rich_text_item_response(rich_text)
Return True
if rich_text
is a text.
Source code in notion_client/helpers.py
114 115 116 |
|
iterate_paginated_api(function, **kwargs)
Return an iterator over the results of any paginated Notion API.
Source code in notion_client/helpers.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
pick(base, *keys)
Return a dict composed of key value pairs for keys passed as args.
Source code in notion_client/helpers.py
8 9 10 11 12 13 14 15 16 17 18 |
|