Periodic Notes Resource¶
PeriodicNotesResource(client)
¶
Bases: ContentResource
Operations on periodic notes (daily, weekly, monthly, quarterly, yearly).
Source code in src/aiobsidian/rest/_base.py
get(period, *, date=None, content_type=ContentType.MARKDOWN)
async
¶
get(
period: Period,
*,
date: datetime.date | None = ...,
content_type: Literal[ContentType.MARKDOWN] = ...,
) -> str
Get the content of a periodic note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
Period
|
The time period (e.g. |
required |
date
|
date | None
|
Specific date to retrieve. Defaults to the current period. |
None
|
content_type
|
ContentType
|
Desired response format. |
MARKDOWN
|
Returns:
| Type | Description |
|---|---|
str | NoteJson | DocumentMap
|
Note content as |
str | NoteJson | DocumentMap
|
depending on the requested content type. |
Source code in src/aiobsidian/rest/periodic.py
update(period, content, *, date=None)
async
¶
Replace the entire content of a periodic note.
If the note does not exist, it will be created.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
Period
|
The time period. |
required |
content
|
str
|
New Markdown content for the note. |
required |
date
|
date | None
|
Specific date to target. Defaults to the current period. |
None
|
Source code in src/aiobsidian/rest/periodic.py
append(period, content, *, date=None)
async
¶
Append content to the end of a periodic note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
Period
|
The time period. |
required |
content
|
str
|
Markdown content to append. |
required |
date
|
date | None
|
Specific date to target. Defaults to the current period. |
None
|
Source code in src/aiobsidian/rest/periodic.py
patch(period, content, *, date=None, operation, target_type, target, target_delimiter='::')
async
¶
Patch a specific section of a periodic note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
Period
|
The time period. |
required |
content
|
str
|
Content to insert or replace. |
required |
date
|
date | None
|
Specific date to target. Defaults to the current period. |
None
|
operation
|
PatchOperation
|
How to apply the content ( |
required |
target_type
|
TargetType
|
What to target ( |
required |
target
|
str
|
The target identifier. |
required |
target_delimiter
|
str
|
Delimiter for nested targets. |
'::'
|
Source code in src/aiobsidian/rest/periodic.py
delete(period, *, date=None)
async
¶
Delete a periodic note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
Period
|
The time period of the note to delete. |
required |
date
|
date | None
|
Specific date to target. Defaults to the current period. |
None
|