chore: メソッドの位置を変更

pull/125/head
yupix 9 months ago
parent f21868f2ec
commit d55f88c0a3
No known key found for this signature in database
GPG Key ID: 2FF705F5C56D9C06

@ -1049,6 +1049,45 @@ class NoteActions(ClientNoteActions):
return [Note(note, client=self._client) for note in res]
async def get_mentions(
self,
following: bool = False,
limit: int = 10,
since_id: str | None = None,
until_id: str | None = None,
visibility: INoteVisibility = "public",
):
"""Get notes with mentions addressed to you
Endpoint: `/api/notes/mentions`
Parameters
----------
following : bool, default=False
Whether to include only users you follow
limit : int, default=10
limit
since_id : str | None, default=None
Since ID
until_id : str | None, default=None
Until ID
visibility : INoteVisibility, default='public'
Disclosure range
"""
data = {
"following": following,
"limit": limit,
"sinceId": since_id,
"untilId": until_id,
"visibility": visibility,
}
res: list[INote] = await self._session.request(
Route("POST", "/api/notes/mentions"), json=data, auth=True
)
return [Note(note, client=self._client) for note in res]
@deprecated
async def send(
self,
@ -1230,45 +1269,6 @@ class NoteActions(ClientNoteActions):
if get_all is False or pagination.is_final:
break
async def get_mentions(
self,
following: bool = False,
limit: int = 10,
since_id: str | None = None,
until_id: str | None = None,
visibility: INoteVisibility = "public",
):
"""Get notes with mentions addressed to you
Endpoint: `/api/notes/mentions`
Parameters
----------
following : bool, default=False
Whether to include only users you follow
limit : int, default=10
limit
since_id : str | None, default=None
Since ID
until_id : str | None, default=None
Until ID
visibility : INoteVisibility, default='public'
Disclosure range
"""
data = {
"following": following,
"limit": limit,
"sinceId": since_id,
"untilId": until_id,
"visibility": visibility,
}
res: list[INote] = await self._session.request(
Route("POST", "/api/notes/mentions"), json=data, auth=True
)
return [Note(note, client=self._client) for note in res]
async def get_time_line(
self,
list_id: str,

@ -9,6 +9,7 @@ from mipac.http import HTTPClient
if TYPE_CHECKING:
from mipac.client import ClientManager
class ClientFavoriteManager(AbstractManager):
def __init__(self, note_id: str, *, session: HTTPClient, client: ClientManager):
self.__note_id = note_id

Loading…
Cancel
Save