Skip to content

Commit

Permalink
Adding better structure and improvements on the docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
SeqLaz committed Aug 30, 2024
1 parent 15ee0c3 commit ec2cf45
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions qfieldcloud_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FileTransferStatus(str, Enum):

class FileTransferType(Enum):
"""Represents the type of file transfer.
The PACKAGE transfer type is used only internally in QFieldCloud workers, so it should never be used by other API clients.
Attributes:
Expand Down Expand Up @@ -97,7 +97,7 @@ class ProjectCollaboratorRole(str, Enum):

class OrganizationMemberRole(str, Enum):
"""Defines roles for organization members.
See organization member roles documentation: https://docs.qfield.org/reference/qfieldcloud/permissions/#roles_2
Attributes:
Expand Down Expand Up @@ -139,15 +139,13 @@ class OrganizationMemberModel(TypedDict):
role (OrganizationMemberRole): The role of the member.
organization (str): The associated organization identifier.
is_public (bool): A boolean indicating if the membership is public.
Todo:
* Future work that can be surely expected, check QF-4535
"""

member: str
role: OrganizationMemberRole
organization: str
is_public: bool
# TODO future work that can be surely expected, check QF-4535
# created_by: str
# updated_by: str
# created_at: datetime.datetime
Expand Down Expand Up @@ -274,8 +272,6 @@ def login(self, username: str, password: str) -> Dict:
def logout(self) -> None:
"""Logout from the current session.
Returns:
None
Example:
client.logout()
Expand Down Expand Up @@ -358,7 +354,7 @@ def create_project(
is_public (Optional[bool]): Whether the project should be public. Defaults to False.
Returns:
Dict: A dictionary containing the details of the created project.
Dict[str, Any]: A dictionary containing the details of the created project.
Example:
client.create_project(name="my_project", is_public=False)
Expand Down

0 comments on commit ec2cf45

Please sign in to comment.