mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-12-19 03:42:22 -06:00
style: format codebase with ruff
This commit is contained in:
@@ -1,60 +1,57 @@
|
||||
from typing import Union, BinaryIO
|
||||
from ..models.profile import *
|
||||
|
||||
|
||||
class ProfileService:
|
||||
def __init__(self, client):
|
||||
self.client = client
|
||||
|
||||
def fetch_business_profile(self, instance_id: str, data: FetchProfile, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/fetchBusinessProfile/{instance_id}',
|
||||
f"chat/fetchBusinessProfile/{instance_id}",
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
instance_token=instance_token,
|
||||
)
|
||||
|
||||
def fetch_profile(self, instance_id: str, data: FetchProfile, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/fetchProfile/{instance_id}',
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
f"chat/fetchProfile/{instance_id}", data=data.__dict__, instance_token=instance_token
|
||||
)
|
||||
|
||||
def update_profile_name(self, instance_id: str, data: ProfileName, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/updateProfileName/{instance_id}',
|
||||
f"chat/updateProfileName/{instance_id}",
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
instance_token=instance_token,
|
||||
)
|
||||
|
||||
def update_profile_status(self, instance_id: str, data: ProfileStatus, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/updateProfileStatus/{instance_id}',
|
||||
f"chat/updateProfileStatus/{instance_id}",
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
instance_token=instance_token,
|
||||
)
|
||||
|
||||
def update_profile_picture(self, instance_id: str, data: ProfilePicture, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/updateProfilePicture/{instance_id}',
|
||||
f"chat/updateProfilePicture/{instance_id}",
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
instance_token=instance_token,
|
||||
)
|
||||
|
||||
def remove_profile_picture(self, instance_id: str, instance_token: str):
|
||||
return self.client.delete(
|
||||
f'chat/removeProfilePicture/{instance_id}',
|
||||
instance_token=instance_token
|
||||
f"chat/removeProfilePicture/{instance_id}", instance_token=instance_token
|
||||
)
|
||||
|
||||
|
||||
def fetch_privacy_settings(self, instance_id: str, instance_token: str):
|
||||
return self.client.get(
|
||||
f'chat/fetchPrivacySettings/{instance_id}',
|
||||
instance_token=instance_token
|
||||
f"chat/fetchPrivacySettings/{instance_id}", instance_token=instance_token
|
||||
)
|
||||
|
||||
def update_privacy_settings(self, instance_id: str, data: PrivacySettings, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/updatePrivacySettings/{instance_id}',
|
||||
f"chat/updatePrivacySettings/{instance_id}",
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
)
|
||||
instance_token=instance_token,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user