From 87067504ab599256b05eedd0def6d470835103a6 Mon Sep 17 00:00:00 2001 From: yupix Date: Sat, 6 Jan 2024 15:20:37 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20notes/local-timeline=20=E3=82=92?= =?UTF-8?q?=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mipac/actions/note.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/mipac/actions/note.py b/mipac/actions/note.py index d0b9073..5ab7b94 100644 --- a/mipac/actions/note.py +++ b/mipac/actions/note.py @@ -1019,6 +1019,36 @@ class NoteActions(ClientNoteActions): return [Note(note, client=self._client) for note in res] + async def get_local_timeline( + self, + with_files: bool = False, + with_renotes: bool = True, + with_replies: bool = False, + limit: int = 10, + since_id: str | None = None, + until_id: str | None = None, + allow_partial: bool = False, + since_date: int | None = None, + until_date: int | None = None, + ): + data = { + "withFiles": with_files, + "withRenotes": with_renotes, + "withReplies": with_replies, + "limit": limit, + "sinceId": since_id, + "untilId": until_id, + "allowPartial": allow_partial, + "sinceDate": since_date, + "untilDate": until_date, + } + + res = await self._session.request( + Route("POST", "/api/notes/local-timeline"), json=data, auth=True + ) + + return [Note(note, client=self._client) for note in res] + @deprecated async def send( self,