diff --git a/misskey/drive.py b/misskey/drive.py index 08230d0..e45229c 100644 --- a/misskey/drive.py +++ b/misskey/drive.py @@ -7,6 +7,9 @@ DriveFile, DriveFileSchema, ) +from .enum import ( + DriveFilesSortEnum, +) __all__ = ( "Misskey", @@ -24,7 +27,7 @@ def drive_files( until_id: Optional[str] = None, folder_id: Optional[str] = None, type: Optional[str] = None, - sort, # TODO: Define enum + sort: Optional[DriveFilesSortEnum] = None, ) -> List[DriveFile]: # TODO raise NotImplementedError() diff --git a/misskey/enum/__init__.py b/misskey/enum/__init__.py index a96504f..483fe47 100644 --- a/misskey/enum/__init__.py +++ b/misskey/enum/__init__.py @@ -8,3 +8,4 @@ from .reaction_acceptance import ReactionAcceptanceEnum from .http_method import HttpMethodEnum from .users import UsersSortEnum, UsersStateEnum, UsersOriginEnum +from .drive_files_sort import DriveFilesSortEnum diff --git a/misskey/enum/drive_files_sort.py b/misskey/enum/drive_files_sort.py new file mode 100644 index 0000000..90434fd --- /dev/null +++ b/misskey/enum/drive_files_sort.py @@ -0,0 +1,14 @@ +from enum import Enum + +__all__ = ( + "DriveFilesSortEnum", +) + + +class DriveFilesSortEnum(Enum): + DESCENDING_CREATED_AT = "+createdAt" + ASCENDING_CREATED_AT = "-createdAt" + DESCENDING_NAME = "+name" + ASCENDING_NAME = "-name" + DESCENDING_SIZE = "+size" + ASCENDING_SIZE = "-size"