forked from EvolutionAPI/evolution-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.py
More file actions
60 lines (54 loc) · 1.42 KB
/
profile.py
File metadata and controls
60 lines (54 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from typing import Literal
class BaseProfile:
def __init__(self, **kwargs):
self.__dict__.update({k: v for k, v in kwargs.items() if v is not None})
class FetchProfile(BaseProfile):
def __init__(
self,
number: str,
):
super().__init__(
number=number,
)
class ProfileName(BaseProfile):
def __init__(
self,
name: str,
):
super().__init__(
name=name,
)
class ProfileStatus(BaseProfile):
def __init__(
self,
status: str,
):
super().__init__(
status=status,
)
class ProfilePicture(BaseProfile):
def __init__(
self,
picture: str,
):
super().__init__(
picture=picture,
)
class PrivacySettings(BaseProfile):
def __init__(
self,
readreceipts: Literal["all", "none"],
profile: Literal["all", "contacts", "contact_blacklist", "none"],
status: Literal["all", "contacts", "contact_blacklist", "none"],
online: Literal["all", "match_last_seen"],
last: Literal["all", "contacts", "contact_blacklist", "none"],
groupadd: Literal["all", "contacts", "contact_blacklist"],
):
super().__init__(
readreceipts=readreceipts,
profile=profile,
status=status,
online=online,
last=last,
groupadd=groupadd,
)