Skip to content

Commit

Permalink
feat: drive/files/* をサポート
Browse files Browse the repository at this point in the history
chore: drive周りを大幅に作り直し
  • Loading branch information
yupix committed Dec 3, 2023
1 parent d55a49c commit b91aaa1
Show file tree
Hide file tree
Showing 9 changed files with 640 additions and 5 deletions.
29 changes: 29 additions & 0 deletions mipac/actions/drive/drive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from mipac.abstract.action import AbstractAction
from mipac.http import HTTPClient, Route
from mipac.models.drive import DriveStatus
from mipac.types.drive import IDriveStatus

if TYPE_CHECKING:
from mipac.manager.client import ClientManager


class DriveActions(AbstractAction):
def __init__(self, *, session: HTTPClient, client: ClientManager):
self.__session: HTTPClient = session
self.__client: ClientManager = client

async def get_status(self) -> DriveStatus:
"""Get the status of the drive
Returns
-------
DriveStatus
The status of the drive
"""

res: IDriveStatus = await self.__session.request(Route("POST", "/api/drive"), auth=True)
return DriveStatus(raw_drive_status=res, client=self.__client)
Loading

0 comments on commit b91aaa1

Please sign in to comment.