|
|
|
@ -22,8 +22,9 @@ class SharedAntennaActions(AbstractAction):
|
|
|
|
|
self._client: ClientManager = client
|
|
|
|
|
|
|
|
|
|
async def delete(self, *, antenna_id: str) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Delete antenna from identifier
|
|
|
|
|
"""Delete antenna from identifier
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/delete`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
@ -44,6 +45,8 @@ class SharedAntennaActions(AbstractAction):
|
|
|
|
|
async def show(self, *, antenna_id: str) -> Antenna:
|
|
|
|
|
"""Show antenna from identifier
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/show`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
antenna_id : str | None, optional
|
|
|
|
@ -70,6 +73,30 @@ class SharedAntennaActions(AbstractAction):
|
|
|
|
|
*,
|
|
|
|
|
antenna_id: str,
|
|
|
|
|
) -> list[Note]:
|
|
|
|
|
"""ノートを取得します
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/notes`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
antenna_id : str
|
|
|
|
|
アンテナのID
|
|
|
|
|
limit : int, optional
|
|
|
|
|
一度に取得する件数, default=10
|
|
|
|
|
since_id : str | None
|
|
|
|
|
指定したIDのノートより後のノートを取得します, default=None
|
|
|
|
|
until_id : str | None
|
|
|
|
|
指定したIDのノートより前のノートを取得します, default=None
|
|
|
|
|
since_date : str | None
|
|
|
|
|
指定した日付のノートより後のノートを取得します, default=None
|
|
|
|
|
until_date : str | None
|
|
|
|
|
指定した日付のノートより前のノートを取得します, default=None
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
|
list[Note]
|
|
|
|
|
取得したノートのリスト
|
|
|
|
|
"""
|
|
|
|
|
body = remove_dict_empty(
|
|
|
|
|
{
|
|
|
|
|
"antennaId": antenna_id,
|
|
|
|
@ -96,6 +123,30 @@ class SharedAntennaActions(AbstractAction):
|
|
|
|
|
*,
|
|
|
|
|
antenna_id: str,
|
|
|
|
|
) -> AsyncGenerator[Note, None]:
|
|
|
|
|
"""すべてのノートを取得します
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/notes`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
antenna_id : str
|
|
|
|
|
アンテナのID
|
|
|
|
|
limit : int, optional
|
|
|
|
|
一度に取得する件数, default=10
|
|
|
|
|
since_id : str | None, optional
|
|
|
|
|
指定したIDのノートより後のノートを取得します, default=None
|
|
|
|
|
until_id : str | None, optional
|
|
|
|
|
指定したIDのノートより前のノートを取得します, default=None
|
|
|
|
|
since_date : str | None, optional
|
|
|
|
|
指定した日付のノートより後のノートを取得します, default=None
|
|
|
|
|
until_date : str | None, optional
|
|
|
|
|
指定した日付のノートより前のノートを取得します, default=None
|
|
|
|
|
|
|
|
|
|
Yields
|
|
|
|
|
------
|
|
|
|
|
Iterator[AsyncGenerator[Note, None]]
|
|
|
|
|
取得したノートのリスト
|
|
|
|
|
"""
|
|
|
|
|
body = remove_dict_empty(
|
|
|
|
|
{
|
|
|
|
|
"antennaId": antenna_id,
|
|
|
|
@ -133,6 +184,8 @@ class SharedAntennaActions(AbstractAction):
|
|
|
|
|
) -> Antenna:
|
|
|
|
|
"""Update an antenna.
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/update`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
@ -200,8 +253,9 @@ class ClientAntennaActions(SharedAntennaActions):
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
async def delete(self) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Delete antenna from identifier
|
|
|
|
|
"""Delete antenna from identifier
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/delete`
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
@ -214,6 +268,8 @@ class ClientAntennaActions(SharedAntennaActions):
|
|
|
|
|
async def show(self) -> Antenna:
|
|
|
|
|
"""Show antenna from identifier
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/show`
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
|
Antenna
|
|
|
|
@ -231,6 +287,29 @@ class ClientAntennaActions(SharedAntennaActions):
|
|
|
|
|
since_date: str | None = None,
|
|
|
|
|
until_date: str | None = None,
|
|
|
|
|
) -> list[Note]:
|
|
|
|
|
"""ノートを取得します
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/notes`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
limit : int, optional
|
|
|
|
|
一度に取得する件数, default=10
|
|
|
|
|
since_id : str | None, optional
|
|
|
|
|
指定したIDのノートより後のノートを取得します, by default None
|
|
|
|
|
until_id : str | None, optional
|
|
|
|
|
指定したIDのノートより前のノートを取得します, by default None
|
|
|
|
|
since_date : str | None, optional
|
|
|
|
|
指定した日付のノートより後のノートを取得します, by default None
|
|
|
|
|
until_date : str | None, optional
|
|
|
|
|
指定した日付のノートより前のノートを取得します, by default None
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
|
list[Note]
|
|
|
|
|
取得したノートのリスト
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
return await super().get_notes(
|
|
|
|
|
limit=limit,
|
|
|
|
|
since_id=since_id,
|
|
|
|
@ -249,6 +328,29 @@ class ClientAntennaActions(SharedAntennaActions):
|
|
|
|
|
since_date: str | None = None,
|
|
|
|
|
until_date: str | None = None,
|
|
|
|
|
) -> AsyncGenerator[Note, None]:
|
|
|
|
|
"""すべてのノートを取得します
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/notes`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
limit : int, optional
|
|
|
|
|
一度に取得する件数, default=10
|
|
|
|
|
since_id : str | None, optional
|
|
|
|
|
指定したIDのノートより後のノートを取得します, default=None
|
|
|
|
|
until_id : str | None, optional
|
|
|
|
|
指定したIDのノートより前のノートを取得します, default=None
|
|
|
|
|
since_date : str | None, optional
|
|
|
|
|
指定した日付のノートより後のノートを取得します, default=None
|
|
|
|
|
until_date : str | None, optional
|
|
|
|
|
指定した日付のノートより前のノートを取得します, default=None
|
|
|
|
|
|
|
|
|
|
Yields
|
|
|
|
|
------
|
|
|
|
|
AsyncGenerator[Note, None]
|
|
|
|
|
取得したノートのリスト
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
async for i in super().get_all_notes(
|
|
|
|
|
limit, since_id, until_id, since_date, until_date, antenna_id=self.__antenna_id
|
|
|
|
|
):
|
|
|
|
@ -270,6 +372,8 @@ class ClientAntennaActions(SharedAntennaActions):
|
|
|
|
|
) -> Antenna:
|
|
|
|
|
"""Update an antenna.
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/update`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
@ -333,6 +437,8 @@ class AntennaActions(SharedAntennaActions):
|
|
|
|
|
) -> Antenna:
|
|
|
|
|
"""Create an antenna.
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/create`
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
@ -402,6 +508,15 @@ class AntennaActions(SharedAntennaActions):
|
|
|
|
|
return Antenna(res_antenna, client=self._client)
|
|
|
|
|
|
|
|
|
|
async def get_list(self) -> list[Antenna]:
|
|
|
|
|
"""アンテナの一覧を取得します
|
|
|
|
|
|
|
|
|
|
Endpoint: `/api/antennas/list`
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
|
list[Antenna]
|
|
|
|
|
アンテナのリスト
|
|
|
|
|
"""
|
|
|
|
|
res_antennas: list[IAntenna] = await self._session.request(
|
|
|
|
|
Route("POST", "/api/antennas/list"), auth=True
|
|
|
|
|
)
|
|
|
|
|