Notes¶
NotesClient¶
Accessed via client.notes.
pyawe.client.NotesClient
¶
Methods for the /notes resource.
list
¶
Return top-level notes visible to the authenticated user.
Returns notes the caller owns plus all shared notes. Replies are
excluded; use :meth:list_replies to fetch them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_type
|
Optional[str]
|
Filter by entity type: |
None
|
entity_id
|
Optional[Union[UUID, str]]
|
Filter by the entity's UUID (requires entity_type). |
None
|
Returns:
| Type | Description |
|---|---|
List[Note]
|
List of :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
create
¶
create(entity_type: str, entity_id: Union[UUID, str], title: str, *, body: Optional[str] = None, is_shared: bool = False) -> Note
Create a top-level note on an entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_type
|
str
|
|
required |
entity_id
|
Union[UUID, str]
|
UUID of the entity. |
required |
title
|
str
|
Note title. |
required |
body
|
Optional[str]
|
Optional Markdown body. |
None
|
is_shared
|
bool
|
When |
False
|
Returns:
| Type | Description |
|---|---|
Note
|
The newly created :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
get
¶
Fetch a single note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_id
|
Union[UUID, str]
|
UUID of the note. |
required |
Returns:
| Type | Description |
|---|---|
Note
|
class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the note does not exist. |
AweAuthError
|
If not authenticated. |
update
¶
update(note_id: Union[UUID, str], *, title: Optional[str] = None, body: Optional[str] = None, is_shared: Optional[bool] = None) -> Note
Update a note; only supplied fields are changed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_id
|
Union[UUID, str]
|
UUID of the note. |
required |
title
|
Optional[str]
|
New title. |
None
|
body
|
Optional[str]
|
New Markdown body. |
None
|
is_shared
|
Optional[bool]
|
New visibility setting. |
None
|
Returns:
| Type | Description |
|---|---|
Note
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the note does not exist. |
AweAuthError
|
If not authenticated. |
delete
¶
Delete a note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_id
|
Union[UUID, str]
|
UUID of the note to delete. |
required |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the note does not exist. |
AweAuthError
|
If not authenticated. |
list_replies
¶
Return all replies to a note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_id
|
Union[UUID, str]
|
UUID of the parent note. |
required |
Returns:
| Type | Description |
|---|---|
List[Note]
|
List of reply :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the note does not exist. |
AweAuthError
|
If not authenticated. |
create_reply
¶
Post a reply to a note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_id
|
Union[UUID, str]
|
UUID of the parent note. |
required |
body
|
str
|
Reply text (Markdown supported). |
required |
Returns:
| Type | Description |
|---|---|
Note
|
The created reply :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the note does not exist. |
AweAuthError
|
If not authenticated. |
move
¶
Move a note to a folder, or remove it from any folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
note_id
|
Union[UUID, str]
|
UUID of the note. |
required |
folder_id
|
Optional[Union[UUID, str]]
|
UUID of the destination folder, or |
required |
Returns:
| Type | Description |
|---|---|
Note
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the note does not exist. |
AweAuthError
|
If not authenticated. |
NoteFoldersClient¶
Accessed via client.note_folders.
pyawe.client.NoteFoldersClient
¶
Methods for the /note-folders resource.
list
¶
Return all note folders for the authenticated user.
Returns:
| Type | Description |
|---|---|
List[NoteFolder]
|
List of :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
create
¶
Create a note folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Folder name. |
required |
Returns:
| Type | Description |
|---|---|
NoteFolder
|
The newly created :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
update
¶
Rename a note folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder_id
|
Union[UUID, str]
|
UUID of the folder. |
required |
name
|
str
|
New name. |
required |
Returns:
| Type | Description |
|---|---|
NoteFolder
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the folder does not exist. |
AweAuthError
|
If not authenticated. |
delete
¶
Delete a note folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder_id
|
Union[UUID, str]
|
UUID of the folder to delete. |
required |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the folder does not exist. |
AweAuthError
|
If not authenticated. |