OnenoteClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnNewSectionInNotebook': {'operation_id': 'OnNewSectionInNotebook', 'path': '/{connectionId}/trigger1/notebooks/notebookKey/sections', 'method': 'get', 'required_parameters': ['notebookKey'], 'callback_payload_type': 'NewSectionResponse'}, 'OnNewSectionGroupInNotebook': {'operation_id': 'OnNewSectionGroupInNotebook', 'path': '/{connectionId}/trigger2/notebooks/notebookKey/sectiongroups', 'method': 'get', 'required_parameters': ['notebookKey'], 'callback_payload_type': 'NewSectionGroupResponse'}, 'OnNewPageInSection': {'operation_id': 'OnNewPageInSection', 'path': '/{connectionId}/trigger3/sections/Dynamic/pages', 'method': 'get', 'required_parameters': ['notebookKey', 'sectionId'], 'callback_payload_type': 'NewPageResponse'}}
Classes
CreateSectionInNotebookResponse
dataclass
CreateSectionInNotebookResponse(context: Optional[str] = None, created_by: Optional[str] = None, created_time: Optional[str] = None, id: Optional[str] = None, is_default: Optional[bool] = None, last_modified_by: Optional[str] = None, last_modified_time: Optional[str] = None, links: Optional[Dict[str, Any]] = None, name: Optional[str] = None, pages_url: Optional[str] = None, self: Optional[str] = None)
Response for Create section in a notebook
Attributes
context
class-attribute
instance-attribute
The OData context.
created_by
class-attribute
instance-attribute
This section created by name.
created_time
class-attribute
instance-attribute
This section created time.
is_default
class-attribute
instance-attribute
A flag to indication if this is the default section.
last_modified_by
class-attribute
instance-attribute
Last modified by name.
last_modified_time
class-attribute
instance-attribute
The time this section was last modified.
links
class-attribute
instance-attribute
OneNote client links.
pages_url
class-attribute
instance-attribute
The url of the pages.
Page
dataclass
Page(title: Optional[str] = None, links: Optional[Link] = None, content_url: Optional[str] = None, last_modified_time: Optional[str] = None, created_time: Optional[str] = None, id: Optional[str] = None)
Response for Create page in a section
Attributes
content_url
class-attribute
instance-attribute
A url to the page content.
last_modified_time
class-attribute
instance-attribute
The last modified date of the page.
created_time
class-attribute
instance-attribute
The date the page was created.
GetPagesInSectionResponse
dataclass
Notebook
dataclass
Response for Get recent notebooks
GetSectionsInNotebookResponse
dataclass
Response for Get sections in notebook
NewSectionResponse
dataclass
NewSectionGroupResponse
dataclass
NewPageResponse
dataclass
CreateSectionRequest
dataclass
GetPageResponse
dataclass
ParentNotebook
dataclass
Definition: ParentNotebook
Attributes
id
class-attribute
instance-attribute
The unique identifier of the parent notebook.
Link
dataclass
Link(one_note_client_url: Optional[OneNoteClientUrl] = None, one_note_web_url: Optional[OneNoteWebUrl] = None)
Definition: Link
OneNoteClientUrl
dataclass
OneNoteWebUrl
dataclass
SectionListItem
dataclass
SectionListItem(name: Optional[str] = None, pages_url: Optional[str] = None, id: Optional[str] = None)
Definition: SectionListItem
Attributes
pages_url
class-attribute
instance-attribute
The key used to reference this section; also a url to the pages.
SectionResponse
dataclass
SectionResponse(created_by: Optional[str] = None, created_time: Optional[str] = None, id: Optional[str] = None, is_default: Optional[bool] = None, last_modified_by: Optional[str] = None, last_modified_time: Optional[str] = None, name: Optional[str] = None, pages_url: Optional[str] = None, parent_notebook: Optional[ParentNotebook] = None, self: Optional[str] = None)
Definition: SectionResponse
Attributes
created_by
class-attribute
instance-attribute
The creator of the section.
created_time
class-attribute
instance-attribute
The creation date and time of the section.
is_default
class-attribute
instance-attribute
Indicates whether it is the default section.
last_modified_by
class-attribute
instance-attribute
The user who last modified the section.
last_modified_time
class-attribute
instance-attribute
The last modified date and time of the section.
pages_url
class-attribute
instance-attribute
Url to the pages in this section.
SectionGroupResponse
dataclass
SectionGroupResponse(created_time: Optional[str] = None, created_by: Optional[str] = None, id: Optional[str] = None, last_modified_by: Optional[str] = None, last_modified_time: Optional[str] = None, name: Optional[str] = None, sections_url: Optional[str] = None, self: Optional[str] = None)
Definition: SectionGroupResponse
Attributes
created_time
class-attribute
instance-attribute
The creation date and time of the section group.
created_by
class-attribute
instance-attribute
The creator of the section group.
id
class-attribute
instance-attribute
Unique identifier of the section group.
last_modified_by
class-attribute
instance-attribute
The user who last modified the section group.
last_modified_time
class-attribute
instance-attribute
The last modification date and time of the section group.
sections_url
class-attribute
instance-attribute
Url of the sections within this section group.
OnenoteClient
OnenoteClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for onenote connector.
Initialize a OnenoteClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
create_section_in_notebook_async
async
create_section_in_notebook_async(input: CreateSectionRequest, notebook_key: str) -> dict[str, Any] | None
Create section in a notebook
Create section in a notebook.
create_page_in_section_async
async
create_page_in_section_async(input: CreatePageInSectionInput, notebook_key: str, section_id: str) -> dict[str, Any] | None
Create page in a section
Create new page in a specified section.
get_pages_in_section_async
async
Get pages for a specific section
Get pages for a specific section.
create_page_in_quick_notes_async
async
Create a page in Quick Notes
Create a new page in the Quick Notes section.
delete_page_async
async
Delete a page
Delete a page.
get_page_content_async
async
Get page content
Get HTML page content.
update_page_content_async
async
update_page_content_async(input: UpdatePageContentRequest, notebook_key: str, section_id: str, page_id: str) -> dict[str, Any] | None
Update page content
Update HTML page content.
get_notebooks_async
async
Get recent notebooks
Get recent notebooks.