mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-12-19 11:52:19 -06:00
adjusts in package
This commit is contained in:
60
build/lib/evolutionapi/services/profile.py
Normal file
60
build/lib/evolutionapi/services/profile.py
Normal file
@@ -0,0 +1,60 @@
|
||||
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}',
|
||||
data=data.__dict__,
|
||||
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
|
||||
)
|
||||
|
||||
def update_profile_name(self, instance_id: str, data: ProfileName, instance_token: str):
|
||||
return self.client.post(
|
||||
f'chat/updateProfileName/{instance_id}',
|
||||
data=data.__dict__,
|
||||
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}',
|
||||
data=data.__dict__,
|
||||
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}',
|
||||
data=data.__dict__,
|
||||
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
|
||||
)
|
||||
|
||||
def fetch_privacy_settings(self, instance_id: str, instance_token: str):
|
||||
return self.client.get(
|
||||
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}',
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
)
|
||||
Reference in New Issue
Block a user