feat: Noteモデルにemojisプロパティを追加

pull/109/head
yupix 7 months ago
parent c5109ba727
commit 0550155f27
No known key found for this signature in database
GPG Key ID: 2FF705F5C56D9C06

@ -1,7 +1,7 @@
from __future__ import annotations
from datetime import datetime
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any
from mipac.models.drive import File
from mipac.models.lite.user import PartialUser
@ -479,6 +479,17 @@ class Note:
else None
)
@property
def emojis(self) -> dict[str, str]:
"""note emojis
Returns
-------
dict[str, str]
note emojis
"""
return self.__raw_note["emojis"]
@property
def channel_id(self) -> str | None:
"""note channelId
@ -634,6 +645,9 @@ class Note:
"""
return self.__client._create_client_note_manager(note_id=self.id)
def _get(self, key: str) -> Any | None:
return self.__raw_note.get(key)
def __eq__(self, __value: object) -> bool:
return isinstance(__value, Note) and self.id == __value.id

@ -81,6 +81,7 @@ class INote(TypedDict):
files: list[IFile]
tags: NotRequired[list[str]]
poll: NotRequired[IPoll]
emojis: dict[str, str]
channel_id: NotRequired[str | None]
channel: NotRequired[INoteChannel | None]
local_only: bool

Loading…
Cancel
Save