slidge-whatsapp 0.2.6__cp312-cp312-manylinux_2_36_aarch64.whl → 0.2.7__cp312-cp312-manylinux_2_36_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slidge-whatsapp might be problematic. Click here for more details.
- slidge_whatsapp/event.go +8 -2
- slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.h +164 -164
- slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +130 -130
- slidge_whatsapp/generated/whatsapp.c +1504 -1504
- slidge_whatsapp/generated/whatsapp.go +1021 -1021
- slidge_whatsapp/generated/whatsapp.py +1209 -1209
- slidge_whatsapp/generated/whatsapp_go.h +164 -164
- slidge_whatsapp/go.mod +6 -6
- slidge_whatsapp/go.sum +12 -18
- slidge_whatsapp/media/media.go +5 -1
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +1 -6
- slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +76 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +38 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +64 -27
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +8 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +19 -12
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +22 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +2 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +33 -17
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +198 -48
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +12 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +16 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +16 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +2436 -1676
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +85 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +800 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +72 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +678 -441
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +20 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +11 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +13 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +10 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +32 -17
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +9 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +4 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +5 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +2 -0
- slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +8 -8
- slidge_whatsapp/vendor/modules.txt +20 -6
- {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/METADATA +1 -1
- {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/RECORD +87 -54
- {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/LICENSE +0 -0
- {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/WHEEL +0 -0
- {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/entry_points.txt +0 -0
|
@@ -1013,9 +1013,9 @@ DefaultUserServer = "s.whatsapp.net"
|
|
|
1013
1013
|
|
|
1014
1014
|
# ---- Structs ---
|
|
1015
1015
|
|
|
1016
|
-
# Python type for struct whatsapp.
|
|
1017
|
-
class
|
|
1018
|
-
"""
|
|
1016
|
+
# Python type for struct whatsapp.Gateway
|
|
1017
|
+
class Gateway(go.GoClass):
|
|
1018
|
+
"""A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
|
|
1019
1019
|
def __init__(self, *args, **kwargs):
|
|
1020
1020
|
"""
|
|
1021
1021
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1029,25 +1029,29 @@ class Presence(go.GoClass):
|
|
|
1029
1029
|
self.handle = args[0].handle
|
|
1030
1030
|
_whatsapp.IncRef(self.handle)
|
|
1031
1031
|
else:
|
|
1032
|
-
self.handle = _whatsapp.
|
|
1032
|
+
self.handle = _whatsapp.whatsapp_Gateway_CTor()
|
|
1033
1033
|
_whatsapp.IncRef(self.handle)
|
|
1034
1034
|
if 0 < len(args):
|
|
1035
|
-
self.
|
|
1036
|
-
if "
|
|
1037
|
-
self.
|
|
1035
|
+
self.DBPath = args[0]
|
|
1036
|
+
if "DBPath" in kwargs:
|
|
1037
|
+
self.DBPath = kwargs["DBPath"]
|
|
1038
1038
|
if 1 < len(args):
|
|
1039
|
-
self.
|
|
1040
|
-
if "
|
|
1041
|
-
self.
|
|
1039
|
+
self.Name = args[1]
|
|
1040
|
+
if "Name" in kwargs:
|
|
1041
|
+
self.Name = kwargs["Name"]
|
|
1042
1042
|
if 2 < len(args):
|
|
1043
|
-
self.
|
|
1044
|
-
if "
|
|
1045
|
-
self.
|
|
1043
|
+
self.LogLevel = args[2]
|
|
1044
|
+
if "LogLevel" in kwargs:
|
|
1045
|
+
self.LogLevel = kwargs["LogLevel"]
|
|
1046
|
+
if 3 < len(args):
|
|
1047
|
+
self.TempDir = args[3]
|
|
1048
|
+
if "TempDir" in kwargs:
|
|
1049
|
+
self.TempDir = kwargs["TempDir"]
|
|
1046
1050
|
def __del__(self):
|
|
1047
1051
|
_whatsapp.DecRef(self.handle)
|
|
1048
1052
|
def __str__(self):
|
|
1049
1053
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1050
|
-
sv = 'whatsapp.
|
|
1054
|
+
sv = 'whatsapp.Gateway{'
|
|
1051
1055
|
first = True
|
|
1052
1056
|
for v in pr:
|
|
1053
1057
|
if callable(v[1]):
|
|
@@ -1060,42 +1064,72 @@ class Presence(go.GoClass):
|
|
|
1060
1064
|
return sv + '}'
|
|
1061
1065
|
def __repr__(self):
|
|
1062
1066
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1063
|
-
sv = 'whatsapp.
|
|
1067
|
+
sv = 'whatsapp.Gateway ( '
|
|
1064
1068
|
for v in pr:
|
|
1065
1069
|
if not callable(v[1]):
|
|
1066
1070
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1067
1071
|
return sv + ')'
|
|
1068
1072
|
@property
|
|
1069
|
-
def
|
|
1070
|
-
return _whatsapp.
|
|
1071
|
-
@
|
|
1072
|
-
def
|
|
1073
|
+
def DBPath(self):
|
|
1074
|
+
return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
|
|
1075
|
+
@DBPath.setter
|
|
1076
|
+
def DBPath(self, value):
|
|
1073
1077
|
if isinstance(value, go.GoClass):
|
|
1074
|
-
_whatsapp.
|
|
1078
|
+
_whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
|
|
1075
1079
|
else:
|
|
1076
|
-
_whatsapp.
|
|
1080
|
+
_whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
|
|
1077
1081
|
@property
|
|
1078
|
-
def
|
|
1079
|
-
return _whatsapp.
|
|
1080
|
-
@
|
|
1081
|
-
def
|
|
1082
|
+
def Name(self):
|
|
1083
|
+
return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
|
|
1084
|
+
@Name.setter
|
|
1085
|
+
def Name(self, value):
|
|
1082
1086
|
if isinstance(value, go.GoClass):
|
|
1083
|
-
_whatsapp.
|
|
1087
|
+
_whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
|
|
1084
1088
|
else:
|
|
1085
|
-
_whatsapp.
|
|
1089
|
+
_whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
|
|
1086
1090
|
@property
|
|
1087
|
-
def
|
|
1088
|
-
return _whatsapp.
|
|
1089
|
-
@
|
|
1090
|
-
def
|
|
1091
|
+
def LogLevel(self):
|
|
1092
|
+
return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
|
|
1093
|
+
@LogLevel.setter
|
|
1094
|
+
def LogLevel(self, value):
|
|
1091
1095
|
if isinstance(value, go.GoClass):
|
|
1092
|
-
_whatsapp.
|
|
1096
|
+
_whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
|
|
1093
1097
|
else:
|
|
1094
|
-
_whatsapp.
|
|
1098
|
+
_whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
|
|
1099
|
+
@property
|
|
1100
|
+
def TempDir(self):
|
|
1101
|
+
return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
|
|
1102
|
+
@TempDir.setter
|
|
1103
|
+
def TempDir(self, value):
|
|
1104
|
+
if isinstance(value, go.GoClass):
|
|
1105
|
+
_whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
|
|
1106
|
+
else:
|
|
1107
|
+
_whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
|
|
1108
|
+
def Init(self):
|
|
1109
|
+
"""Init() str
|
|
1110
|
+
|
|
1111
|
+
Init performs initialization procedures for the Gateway, and is expected to be run before any
|
|
1112
|
+
calls to [Gateway.Session].
|
|
1113
|
+
"""
|
|
1114
|
+
return _whatsapp.whatsapp_Gateway_Init(self.handle)
|
|
1115
|
+
def NewSession(self, device):
|
|
1116
|
+
"""NewSession(object device) object
|
|
1117
|
+
|
|
1118
|
+
NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
|
|
1119
|
+
a valid ID, a pair operation will be required, as described in [Session.Login].
|
|
1120
|
+
"""
|
|
1121
|
+
return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
|
|
1122
|
+
def CleanupSession(self, device):
|
|
1123
|
+
"""CleanupSession(object device) str
|
|
1124
|
+
|
|
1125
|
+
CleanupSession will remove all invalid and obsolete references to the given device, and should be
|
|
1126
|
+
used when pairing a new device or unregistering from the Gateway.
|
|
1127
|
+
"""
|
|
1128
|
+
return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
|
|
1095
1129
|
|
|
1096
|
-
# Python type for struct whatsapp.
|
|
1097
|
-
class
|
|
1098
|
-
"""A
|
|
1130
|
+
# Python type for struct whatsapp.Location
|
|
1131
|
+
class Location(go.GoClass):
|
|
1132
|
+
"""A Location represents additional metadata given to location messages.\n"""
|
|
1099
1133
|
def __init__(self, *args, **kwargs):
|
|
1100
1134
|
"""
|
|
1101
1135
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1109,25 +1143,41 @@ class ChatState(go.GoClass):
|
|
|
1109
1143
|
self.handle = args[0].handle
|
|
1110
1144
|
_whatsapp.IncRef(self.handle)
|
|
1111
1145
|
else:
|
|
1112
|
-
self.handle = _whatsapp.
|
|
1146
|
+
self.handle = _whatsapp.whatsapp_Location_CTor()
|
|
1113
1147
|
_whatsapp.IncRef(self.handle)
|
|
1114
1148
|
if 0 < len(args):
|
|
1115
|
-
self.
|
|
1116
|
-
if "
|
|
1117
|
-
self.
|
|
1149
|
+
self.Latitude = args[0]
|
|
1150
|
+
if "Latitude" in kwargs:
|
|
1151
|
+
self.Latitude = kwargs["Latitude"]
|
|
1118
1152
|
if 1 < len(args):
|
|
1119
|
-
self.
|
|
1120
|
-
if "
|
|
1121
|
-
self.
|
|
1153
|
+
self.Longitude = args[1]
|
|
1154
|
+
if "Longitude" in kwargs:
|
|
1155
|
+
self.Longitude = kwargs["Longitude"]
|
|
1122
1156
|
if 2 < len(args):
|
|
1123
|
-
self.
|
|
1124
|
-
if "
|
|
1125
|
-
self.
|
|
1157
|
+
self.Accuracy = args[2]
|
|
1158
|
+
if "Accuracy" in kwargs:
|
|
1159
|
+
self.Accuracy = kwargs["Accuracy"]
|
|
1160
|
+
if 3 < len(args):
|
|
1161
|
+
self.IsLive = args[3]
|
|
1162
|
+
if "IsLive" in kwargs:
|
|
1163
|
+
self.IsLive = kwargs["IsLive"]
|
|
1164
|
+
if 4 < len(args):
|
|
1165
|
+
self.Name = args[4]
|
|
1166
|
+
if "Name" in kwargs:
|
|
1167
|
+
self.Name = kwargs["Name"]
|
|
1168
|
+
if 5 < len(args):
|
|
1169
|
+
self.Address = args[5]
|
|
1170
|
+
if "Address" in kwargs:
|
|
1171
|
+
self.Address = kwargs["Address"]
|
|
1172
|
+
if 6 < len(args):
|
|
1173
|
+
self.URL = args[6]
|
|
1174
|
+
if "URL" in kwargs:
|
|
1175
|
+
self.URL = kwargs["URL"]
|
|
1126
1176
|
def __del__(self):
|
|
1127
1177
|
_whatsapp.DecRef(self.handle)
|
|
1128
1178
|
def __str__(self):
|
|
1129
1179
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1130
|
-
sv = 'whatsapp.
|
|
1180
|
+
sv = 'whatsapp.Location{'
|
|
1131
1181
|
first = True
|
|
1132
1182
|
for v in pr:
|
|
1133
1183
|
if callable(v[1]):
|
|
@@ -1140,42 +1190,80 @@ class ChatState(go.GoClass):
|
|
|
1140
1190
|
return sv + '}'
|
|
1141
1191
|
def __repr__(self):
|
|
1142
1192
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1143
|
-
sv = 'whatsapp.
|
|
1193
|
+
sv = 'whatsapp.Location ( '
|
|
1144
1194
|
for v in pr:
|
|
1145
1195
|
if not callable(v[1]):
|
|
1146
1196
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1147
1197
|
return sv + ')'
|
|
1148
1198
|
@property
|
|
1149
|
-
def
|
|
1150
|
-
return _whatsapp.
|
|
1151
|
-
@
|
|
1152
|
-
def
|
|
1199
|
+
def Latitude(self):
|
|
1200
|
+
return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
|
|
1201
|
+
@Latitude.setter
|
|
1202
|
+
def Latitude(self, value):
|
|
1153
1203
|
if isinstance(value, go.GoClass):
|
|
1154
|
-
_whatsapp.
|
|
1204
|
+
_whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
|
|
1155
1205
|
else:
|
|
1156
|
-
_whatsapp.
|
|
1206
|
+
_whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
|
|
1157
1207
|
@property
|
|
1158
|
-
def
|
|
1159
|
-
return _whatsapp.
|
|
1160
|
-
@
|
|
1161
|
-
def
|
|
1208
|
+
def Longitude(self):
|
|
1209
|
+
return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
|
|
1210
|
+
@Longitude.setter
|
|
1211
|
+
def Longitude(self, value):
|
|
1162
1212
|
if isinstance(value, go.GoClass):
|
|
1163
|
-
_whatsapp.
|
|
1213
|
+
_whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
|
|
1164
1214
|
else:
|
|
1165
|
-
_whatsapp.
|
|
1215
|
+
_whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
|
|
1166
1216
|
@property
|
|
1167
|
-
def
|
|
1168
|
-
return _whatsapp.
|
|
1169
|
-
@
|
|
1170
|
-
def
|
|
1217
|
+
def Accuracy(self):
|
|
1218
|
+
return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
|
|
1219
|
+
@Accuracy.setter
|
|
1220
|
+
def Accuracy(self, value):
|
|
1171
1221
|
if isinstance(value, go.GoClass):
|
|
1172
|
-
_whatsapp.
|
|
1222
|
+
_whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
|
|
1173
1223
|
else:
|
|
1174
|
-
_whatsapp.
|
|
1224
|
+
_whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
|
|
1225
|
+
@property
|
|
1226
|
+
def IsLive(self):
|
|
1227
|
+
return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
|
|
1228
|
+
@IsLive.setter
|
|
1229
|
+
def IsLive(self, value):
|
|
1230
|
+
if isinstance(value, go.GoClass):
|
|
1231
|
+
_whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
|
|
1232
|
+
else:
|
|
1233
|
+
_whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
|
|
1234
|
+
@property
|
|
1235
|
+
def Name(self):
|
|
1236
|
+
"""Optional fields given for named locations.
|
|
1237
|
+
"""
|
|
1238
|
+
return _whatsapp.whatsapp_Location_Name_Get(self.handle)
|
|
1239
|
+
@Name.setter
|
|
1240
|
+
def Name(self, value):
|
|
1241
|
+
if isinstance(value, go.GoClass):
|
|
1242
|
+
_whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
|
|
1243
|
+
else:
|
|
1244
|
+
_whatsapp.whatsapp_Location_Name_Set(self.handle, value)
|
|
1245
|
+
@property
|
|
1246
|
+
def Address(self):
|
|
1247
|
+
return _whatsapp.whatsapp_Location_Address_Get(self.handle)
|
|
1248
|
+
@Address.setter
|
|
1249
|
+
def Address(self, value):
|
|
1250
|
+
if isinstance(value, go.GoClass):
|
|
1251
|
+
_whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
|
|
1252
|
+
else:
|
|
1253
|
+
_whatsapp.whatsapp_Location_Address_Set(self.handle, value)
|
|
1254
|
+
@property
|
|
1255
|
+
def URL(self):
|
|
1256
|
+
return _whatsapp.whatsapp_Location_URL_Get(self.handle)
|
|
1257
|
+
@URL.setter
|
|
1258
|
+
def URL(self, value):
|
|
1259
|
+
if isinstance(value, go.GoClass):
|
|
1260
|
+
_whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
|
|
1261
|
+
else:
|
|
1262
|
+
_whatsapp.whatsapp_Location_URL_Set(self.handle, value)
|
|
1175
1263
|
|
|
1176
|
-
# Python type for struct whatsapp.
|
|
1177
|
-
class
|
|
1178
|
-
"""A
|
|
1264
|
+
# Python type for struct whatsapp.PollOption
|
|
1265
|
+
class PollOption(go.GoClass):
|
|
1266
|
+
"""A PollOption represents an individual choice within a broader poll.\n"""
|
|
1179
1267
|
def __init__(self, *args, **kwargs):
|
|
1180
1268
|
"""
|
|
1181
1269
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1189,33 +1277,17 @@ class Group(go.GoClass):
|
|
|
1189
1277
|
self.handle = args[0].handle
|
|
1190
1278
|
_whatsapp.IncRef(self.handle)
|
|
1191
1279
|
else:
|
|
1192
|
-
self.handle = _whatsapp.
|
|
1280
|
+
self.handle = _whatsapp.whatsapp_PollOption_CTor()
|
|
1193
1281
|
_whatsapp.IncRef(self.handle)
|
|
1194
1282
|
if 0 < len(args):
|
|
1195
|
-
self.
|
|
1196
|
-
if "
|
|
1197
|
-
self.
|
|
1198
|
-
if 1 < len(args):
|
|
1199
|
-
self.Name = args[1]
|
|
1200
|
-
if "Name" in kwargs:
|
|
1201
|
-
self.Name = kwargs["Name"]
|
|
1202
|
-
if 2 < len(args):
|
|
1203
|
-
self.Subject = args[2]
|
|
1204
|
-
if "Subject" in kwargs:
|
|
1205
|
-
self.Subject = kwargs["Subject"]
|
|
1206
|
-
if 3 < len(args):
|
|
1207
|
-
self.Nickname = args[3]
|
|
1208
|
-
if "Nickname" in kwargs:
|
|
1209
|
-
self.Nickname = kwargs["Nickname"]
|
|
1210
|
-
if 4 < len(args):
|
|
1211
|
-
self.Participants = args[4]
|
|
1212
|
-
if "Participants" in kwargs:
|
|
1213
|
-
self.Participants = kwargs["Participants"]
|
|
1283
|
+
self.Title = args[0]
|
|
1284
|
+
if "Title" in kwargs:
|
|
1285
|
+
self.Title = kwargs["Title"]
|
|
1214
1286
|
def __del__(self):
|
|
1215
1287
|
_whatsapp.DecRef(self.handle)
|
|
1216
1288
|
def __str__(self):
|
|
1217
1289
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1218
|
-
sv = 'whatsapp.
|
|
1290
|
+
sv = 'whatsapp.PollOption{'
|
|
1219
1291
|
first = True
|
|
1220
1292
|
for v in pr:
|
|
1221
1293
|
if callable(v[1]):
|
|
@@ -1228,60 +1300,24 @@ class Group(go.GoClass):
|
|
|
1228
1300
|
return sv + '}'
|
|
1229
1301
|
def __repr__(self):
|
|
1230
1302
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1231
|
-
sv = 'whatsapp.
|
|
1303
|
+
sv = 'whatsapp.PollOption ( '
|
|
1232
1304
|
for v in pr:
|
|
1233
1305
|
if not callable(v[1]):
|
|
1234
1306
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1235
1307
|
return sv + ')'
|
|
1236
1308
|
@property
|
|
1237
|
-
def
|
|
1238
|
-
return _whatsapp.
|
|
1239
|
-
@
|
|
1240
|
-
def
|
|
1241
|
-
if isinstance(value, go.GoClass):
|
|
1242
|
-
_whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
|
|
1243
|
-
else:
|
|
1244
|
-
_whatsapp.whatsapp_Group_JID_Set(self.handle, value)
|
|
1245
|
-
@property
|
|
1246
|
-
def Name(self):
|
|
1247
|
-
return _whatsapp.whatsapp_Group_Name_Get(self.handle)
|
|
1248
|
-
@Name.setter
|
|
1249
|
-
def Name(self, value):
|
|
1250
|
-
if isinstance(value, go.GoClass):
|
|
1251
|
-
_whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
|
|
1252
|
-
else:
|
|
1253
|
-
_whatsapp.whatsapp_Group_Name_Set(self.handle, value)
|
|
1254
|
-
@property
|
|
1255
|
-
def Subject(self):
|
|
1256
|
-
return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
|
|
1257
|
-
@Subject.setter
|
|
1258
|
-
def Subject(self, value):
|
|
1259
|
-
if isinstance(value, go.GoClass):
|
|
1260
|
-
_whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
|
|
1261
|
-
else:
|
|
1262
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1263
|
-
@property
|
|
1264
|
-
def Nickname(self):
|
|
1265
|
-
return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
|
|
1266
|
-
@Nickname.setter
|
|
1267
|
-
def Nickname(self, value):
|
|
1268
|
-
if isinstance(value, go.GoClass):
|
|
1269
|
-
_whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
|
|
1270
|
-
else:
|
|
1271
|
-
_whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
|
|
1272
|
-
@property
|
|
1273
|
-
def Participants(self):
|
|
1274
|
-
return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
|
|
1275
|
-
@Participants.setter
|
|
1276
|
-
def Participants(self, value):
|
|
1309
|
+
def Title(self):
|
|
1310
|
+
return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
|
|
1311
|
+
@Title.setter
|
|
1312
|
+
def Title(self, value):
|
|
1277
1313
|
if isinstance(value, go.GoClass):
|
|
1278
|
-
_whatsapp.
|
|
1314
|
+
_whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
|
|
1279
1315
|
else:
|
|
1280
|
-
|
|
1316
|
+
_whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
|
|
1281
1317
|
|
|
1282
|
-
# Python type for struct whatsapp.
|
|
1283
|
-
class
|
|
1284
|
-
"""A
|
|
1318
|
+
# Python type for struct whatsapp.Session
|
|
1319
|
+
class Session(go.GoClass):
|
|
1320
|
+
"""A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
|
|
1285
1321
|
def __init__(self, *args, **kwargs):
|
|
1286
1322
|
"""
|
|
1287
1323
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1295,17 +1331,13 @@ class LinkedDevice(go.GoClass):
|
|
|
1295
1331
|
self.handle = args[0].handle
|
|
1296
1332
|
_whatsapp.IncRef(self.handle)
|
|
1297
1333
|
else:
|
|
1298
|
-
self.handle = _whatsapp.
|
|
1334
|
+
self.handle = _whatsapp.whatsapp_Session_CTor()
|
|
1299
1335
|
_whatsapp.IncRef(self.handle)
|
|
1300
|
-
if 0 < len(args):
|
|
1301
|
-
self.ID = args[0]
|
|
1302
|
-
if "ID" in kwargs:
|
|
1303
|
-
self.ID = kwargs["ID"]
|
|
1304
1336
|
def __del__(self):
|
|
1305
1337
|
_whatsapp.DecRef(self.handle)
|
|
1306
1338
|
def __str__(self):
|
|
1307
1339
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1308
|
-
sv = 'whatsapp.
|
|
1340
|
+
sv = 'whatsapp.Session{'
|
|
1309
1341
|
first = True
|
|
1310
1342
|
for v in pr:
|
|
1311
1343
|
if callable(v[1]):
|
|
@@ -1318,34 +1350,167 @@ class LinkedDevice(go.GoClass):
|
|
|
1318
1350
|
return sv + '}'
|
|
1319
1351
|
def __repr__(self):
|
|
1320
1352
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1321
|
-
sv = 'whatsapp.
|
|
1353
|
+
sv = 'whatsapp.Session ( '
|
|
1322
1354
|
for v in pr:
|
|
1323
1355
|
if not callable(v[1]):
|
|
1324
1356
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1325
1357
|
return sv + ')'
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1358
|
+
def Login(self):
|
|
1359
|
+
"""Login() str
|
|
1360
|
+
|
|
1361
|
+
Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
|
|
1362
|
+
or by initiating a pairing session for a new linked device. Callers are expected to have set an
|
|
1363
|
+
event handler in order to receive any incoming events from the underlying WhatsApp session.
|
|
1330
1364
|
"""
|
|
1331
|
-
return _whatsapp.
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
if isinstance(value, go.GoClass):
|
|
1335
|
-
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
|
|
1336
|
-
else:
|
|
1337
|
-
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
|
|
1338
|
-
def JID(self):
|
|
1339
|
-
"""JID() object
|
|
1365
|
+
return _whatsapp.whatsapp_Session_Login(self.handle)
|
|
1366
|
+
def Logout(self):
|
|
1367
|
+
"""Logout() str
|
|
1340
1368
|
|
|
1341
|
-
|
|
1342
|
-
may return invalid JIDs, and this function does not handle errors.
|
|
1369
|
+
Logout disconnects and removes the current linked device locally and initiates a logout remotely.
|
|
1343
1370
|
"""
|
|
1344
|
-
return
|
|
1371
|
+
return _whatsapp.whatsapp_Session_Logout(self.handle)
|
|
1372
|
+
def Disconnect(self):
|
|
1373
|
+
"""Disconnect() str
|
|
1374
|
+
|
|
1375
|
+
Disconnects detaches the current connection to WhatsApp without removing any linked device state.
|
|
1376
|
+
"""
|
|
1377
|
+
return _whatsapp.whatsapp_Session_Disconnect(self.handle)
|
|
1378
|
+
def PairPhone(self, phone):
|
|
1379
|
+
"""PairPhone(str phone) str, str
|
|
1380
|
+
|
|
1381
|
+
PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
|
|
1382
|
+
user's primary device, as identified by the given phone number. This will return an error if the
|
|
1383
|
+
[Session] is already paired, or if the phone number given is empty or invalid.
|
|
1384
|
+
"""
|
|
1385
|
+
return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
|
|
1386
|
+
def SendMessage(self, message):
|
|
1387
|
+
"""SendMessage(object message) str
|
|
1388
|
+
|
|
1389
|
+
SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
|
|
1390
|
+
specified within. In general, different message kinds require different fields to be set; see the
|
|
1391
|
+
documentation for the [Message] type for more information.
|
|
1392
|
+
"""
|
|
1393
|
+
return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
|
|
1394
|
+
def GenerateMessageID(self):
|
|
1395
|
+
"""GenerateMessageID() str
|
|
1396
|
+
|
|
1397
|
+
GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
|
|
1398
|
+
"""
|
|
1399
|
+
return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
|
|
1400
|
+
def SendChatState(self, state):
|
|
1401
|
+
"""SendChatState(object state) str
|
|
1402
|
+
|
|
1403
|
+
SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
|
|
1404
|
+
contact specified within.
|
|
1405
|
+
"""
|
|
1406
|
+
return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
|
|
1407
|
+
def SendReceipt(self, receipt):
|
|
1408
|
+
"""SendReceipt(object receipt) str
|
|
1409
|
+
|
|
1410
|
+
SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
|
|
1411
|
+
"""
|
|
1412
|
+
return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
|
|
1413
|
+
def SendPresence(self, presence, statusMessage):
|
|
1414
|
+
"""SendPresence(int presence, str statusMessage) str
|
|
1415
|
+
|
|
1416
|
+
SendPresence sets the activity state and (optional) status message for the current session and
|
|
1417
|
+
user. An error is returned if setting availability fails for any reason.
|
|
1418
|
+
"""
|
|
1419
|
+
return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
|
|
1420
|
+
def GetContacts(self, refresh):
|
|
1421
|
+
"""GetContacts(bool refresh) []object, str
|
|
1422
|
+
|
|
1423
|
+
GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
|
|
1424
|
+
If `refresh` is `true`, FetchRoster will pull application state from the remote service and
|
|
1425
|
+
synchronize any contacts found with the adapter.
|
|
1426
|
+
"""
|
|
1427
|
+
return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
|
|
1428
|
+
def GetGroups(self):
|
|
1429
|
+
"""GetGroups() []object, str
|
|
1430
|
+
|
|
1431
|
+
GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
|
|
1432
|
+
information on present participants.
|
|
1433
|
+
"""
|
|
1434
|
+
return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
|
|
1435
|
+
def CreateGroup(self, name, participants):
|
|
1436
|
+
"""CreateGroup(str name, []str participants) object, str
|
|
1437
|
+
|
|
1438
|
+
CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
|
|
1439
|
+
participant JIDs given.
|
|
1440
|
+
"""
|
|
1441
|
+
return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
|
|
1442
|
+
def LeaveGroup(self, resourceID):
|
|
1443
|
+
"""LeaveGroup(str resourceID) str
|
|
1444
|
+
|
|
1445
|
+
LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
|
|
1446
|
+
"""
|
|
1447
|
+
return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
|
|
1448
|
+
def GetAvatar(self, resourceID, avatarID):
|
|
1449
|
+
"""GetAvatar(str resourceID, str avatarID) object, str
|
|
1450
|
+
|
|
1451
|
+
GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
|
|
1452
|
+
is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
|
|
1453
|
+
for the given ID has not changed.
|
|
1454
|
+
"""
|
|
1455
|
+
return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
|
|
1456
|
+
def SetAvatar(self, resourceID, avatar):
|
|
1457
|
+
"""SetAvatar(str resourceID, []int avatar) str, str
|
|
1458
|
+
|
|
1459
|
+
SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
|
|
1460
|
+
profile picture for our own user by providing an empty JID. The unique picture ID is returned,
|
|
1461
|
+
typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
|
|
1462
|
+
"""
|
|
1463
|
+
return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
|
|
1464
|
+
def SetGroupName(self, resourceID, name):
|
|
1465
|
+
"""SetGroupName(str resourceID, str name) str
|
|
1466
|
+
|
|
1467
|
+
SetGroupName updates the name of a WhatsApp group for the Group JID given.
|
|
1468
|
+
"""
|
|
1469
|
+
return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
|
|
1470
|
+
def SetGroupTopic(self, resourceID, topic):
|
|
1471
|
+
"""SetGroupTopic(str resourceID, str topic) str
|
|
1472
|
+
|
|
1473
|
+
SetGroupName updates the topic of a WhatsApp group for the Group JID given.
|
|
1474
|
+
"""
|
|
1475
|
+
return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
|
|
1476
|
+
def UpdateGroupParticipants(self, resourceID, participants):
|
|
1477
|
+
"""UpdateGroupParticipants(str resourceID, []object participants) []object, str
|
|
1478
|
+
|
|
1479
|
+
UpdateGroupParticipants processes changes to the given group's participants, including additions,
|
|
1480
|
+
removals, and changes to privileges. Participant JIDs given must be part of the authenticated
|
|
1481
|
+
session's roster at least, and must also be active group participants for other types of changes.
|
|
1482
|
+
"""
|
|
1483
|
+
return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
|
|
1484
|
+
def FindContact(self, phone):
|
|
1485
|
+
"""FindContact(str phone) object, str
|
|
1486
|
+
|
|
1487
|
+
FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
|
|
1488
|
+
phone number, returning a concrete instance if found; typically, only the contact JID is set. No
|
|
1489
|
+
error is returned if no contact was found, but any unexpected errors will otherwise be returned
|
|
1490
|
+
directly.
|
|
1491
|
+
"""
|
|
1492
|
+
return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
|
|
1493
|
+
def RequestMessageHistory(self, resourceID, oldestMessage):
|
|
1494
|
+
"""RequestMessageHistory(str resourceID, object oldestMessage) str
|
|
1495
|
+
|
|
1496
|
+
RequestMessageHistory sends and asynchronous request for message history related to the given
|
|
1497
|
+
resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
|
|
1498
|
+
history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
|
|
1499
|
+
event handler. An error will be returned if requesting history fails for any reason.
|
|
1500
|
+
"""
|
|
1501
|
+
return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
|
|
1502
|
+
def SetEventHandler(self, h, goRun=False):
|
|
1503
|
+
"""SetEventHandler(callable h)
|
|
1504
|
+
|
|
1505
|
+
SetEventHandler assigns the given handler function for propagating internal events into the Python
|
|
1506
|
+
gateway. Note that the event handler function is not entirely safe to use directly, and all calls
|
|
1507
|
+
should instead be sent to the [Gateway] via its internal call channel.
|
|
1508
|
+
"""
|
|
1509
|
+
_whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
|
|
1345
1510
|
|
|
1346
|
-
# Python type for struct whatsapp.
|
|
1347
|
-
class
|
|
1348
|
-
"""A
|
|
1511
|
+
# Python type for struct whatsapp.Album
|
|
1512
|
+
class Album(go.GoClass):
|
|
1513
|
+
"""A Album message represents a collection of media files, typically images and videos.\n"""
|
|
1349
1514
|
def __init__(self, *args, **kwargs):
|
|
1350
1515
|
"""
|
|
1351
1516
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1359,41 +1524,25 @@ class Location(go.GoClass):
|
|
|
1359
1524
|
self.handle = args[0].handle
|
|
1360
1525
|
_whatsapp.IncRef(self.handle)
|
|
1361
1526
|
else:
|
|
1362
|
-
self.handle = _whatsapp.
|
|
1527
|
+
self.handle = _whatsapp.whatsapp_Album_CTor()
|
|
1363
1528
|
_whatsapp.IncRef(self.handle)
|
|
1364
1529
|
if 0 < len(args):
|
|
1365
|
-
self.
|
|
1366
|
-
if "
|
|
1367
|
-
self.
|
|
1530
|
+
self.IsAlbum = args[0]
|
|
1531
|
+
if "IsAlbum" in kwargs:
|
|
1532
|
+
self.IsAlbum = kwargs["IsAlbum"]
|
|
1368
1533
|
if 1 < len(args):
|
|
1369
|
-
self.
|
|
1370
|
-
if "
|
|
1371
|
-
self.
|
|
1534
|
+
self.ImageCount = args[1]
|
|
1535
|
+
if "ImageCount" in kwargs:
|
|
1536
|
+
self.ImageCount = kwargs["ImageCount"]
|
|
1372
1537
|
if 2 < len(args):
|
|
1373
|
-
self.
|
|
1374
|
-
if "
|
|
1375
|
-
self.
|
|
1376
|
-
if 3 < len(args):
|
|
1377
|
-
self.IsLive = args[3]
|
|
1378
|
-
if "IsLive" in kwargs:
|
|
1379
|
-
self.IsLive = kwargs["IsLive"]
|
|
1380
|
-
if 4 < len(args):
|
|
1381
|
-
self.Name = args[4]
|
|
1382
|
-
if "Name" in kwargs:
|
|
1383
|
-
self.Name = kwargs["Name"]
|
|
1384
|
-
if 5 < len(args):
|
|
1385
|
-
self.Address = args[5]
|
|
1386
|
-
if "Address" in kwargs:
|
|
1387
|
-
self.Address = kwargs["Address"]
|
|
1388
|
-
if 6 < len(args):
|
|
1389
|
-
self.URL = args[6]
|
|
1390
|
-
if "URL" in kwargs:
|
|
1391
|
-
self.URL = kwargs["URL"]
|
|
1538
|
+
self.VideoCount = args[2]
|
|
1539
|
+
if "VideoCount" in kwargs:
|
|
1540
|
+
self.VideoCount = kwargs["VideoCount"]
|
|
1392
1541
|
def __del__(self):
|
|
1393
1542
|
_whatsapp.DecRef(self.handle)
|
|
1394
1543
|
def __str__(self):
|
|
1395
1544
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1396
|
-
sv = 'whatsapp.
|
|
1545
|
+
sv = 'whatsapp.Album{'
|
|
1397
1546
|
first = True
|
|
1398
1547
|
for v in pr:
|
|
1399
1548
|
if callable(v[1]):
|
|
@@ -1406,80 +1555,42 @@ class Location(go.GoClass):
|
|
|
1406
1555
|
return sv + '}'
|
|
1407
1556
|
def __repr__(self):
|
|
1408
1557
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1409
|
-
sv = 'whatsapp.
|
|
1558
|
+
sv = 'whatsapp.Album ( '
|
|
1410
1559
|
for v in pr:
|
|
1411
1560
|
if not callable(v[1]):
|
|
1412
1561
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1413
1562
|
return sv + ')'
|
|
1414
1563
|
@property
|
|
1415
|
-
def
|
|
1416
|
-
return _whatsapp.
|
|
1417
|
-
@
|
|
1418
|
-
def
|
|
1419
|
-
if isinstance(value, go.GoClass):
|
|
1420
|
-
_whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
|
|
1421
|
-
else:
|
|
1422
|
-
_whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
|
|
1423
|
-
@property
|
|
1424
|
-
def Longitude(self):
|
|
1425
|
-
return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
|
|
1426
|
-
@Longitude.setter
|
|
1427
|
-
def Longitude(self, value):
|
|
1428
|
-
if isinstance(value, go.GoClass):
|
|
1429
|
-
_whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
|
|
1430
|
-
else:
|
|
1431
|
-
_whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
|
|
1432
|
-
@property
|
|
1433
|
-
def Accuracy(self):
|
|
1434
|
-
return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
|
|
1435
|
-
@Accuracy.setter
|
|
1436
|
-
def Accuracy(self, value):
|
|
1437
|
-
if isinstance(value, go.GoClass):
|
|
1438
|
-
_whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
|
|
1439
|
-
else:
|
|
1440
|
-
_whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
|
|
1441
|
-
@property
|
|
1442
|
-
def IsLive(self):
|
|
1443
|
-
return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
|
|
1444
|
-
@IsLive.setter
|
|
1445
|
-
def IsLive(self, value):
|
|
1446
|
-
if isinstance(value, go.GoClass):
|
|
1447
|
-
_whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
|
|
1448
|
-
else:
|
|
1449
|
-
_whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
|
|
1450
|
-
@property
|
|
1451
|
-
def Name(self):
|
|
1452
|
-
"""Optional fields given for named locations.
|
|
1453
|
-
"""
|
|
1454
|
-
return _whatsapp.whatsapp_Location_Name_Get(self.handle)
|
|
1455
|
-
@Name.setter
|
|
1456
|
-
def Name(self, value):
|
|
1564
|
+
def IsAlbum(self):
|
|
1565
|
+
return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
|
|
1566
|
+
@IsAlbum.setter
|
|
1567
|
+
def IsAlbum(self, value):
|
|
1457
1568
|
if isinstance(value, go.GoClass):
|
|
1458
|
-
_whatsapp.
|
|
1569
|
+
_whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
|
|
1459
1570
|
else:
|
|
1460
|
-
_whatsapp.
|
|
1571
|
+
_whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
|
|
1461
1572
|
@property
|
|
1462
|
-
def
|
|
1463
|
-
return _whatsapp.
|
|
1464
|
-
@
|
|
1465
|
-
def
|
|
1573
|
+
def ImageCount(self):
|
|
1574
|
+
return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
|
|
1575
|
+
@ImageCount.setter
|
|
1576
|
+
def ImageCount(self, value):
|
|
1466
1577
|
if isinstance(value, go.GoClass):
|
|
1467
|
-
_whatsapp.
|
|
1578
|
+
_whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
|
|
1468
1579
|
else:
|
|
1469
|
-
_whatsapp.
|
|
1580
|
+
_whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
|
|
1470
1581
|
@property
|
|
1471
|
-
def
|
|
1472
|
-
return _whatsapp.
|
|
1473
|
-
@
|
|
1474
|
-
def
|
|
1582
|
+
def VideoCount(self):
|
|
1583
|
+
return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
|
|
1584
|
+
@VideoCount.setter
|
|
1585
|
+
def VideoCount(self, value):
|
|
1475
1586
|
if isinstance(value, go.GoClass):
|
|
1476
|
-
_whatsapp.
|
|
1587
|
+
_whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
|
|
1477
1588
|
else:
|
|
1478
|
-
_whatsapp.
|
|
1589
|
+
_whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
|
|
1479
1590
|
|
|
1480
|
-
# Python type for struct whatsapp.
|
|
1481
|
-
class
|
|
1482
|
-
"""A
|
|
1591
|
+
# Python type for struct whatsapp.Avatar
|
|
1592
|
+
class Avatar(go.GoClass):
|
|
1593
|
+
"""A Avatar represents a small image set for a Contact or Group.\n"""
|
|
1483
1594
|
def __init__(self, *args, **kwargs):
|
|
1484
1595
|
"""
|
|
1485
1596
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1493,21 +1604,21 @@ class Poll(go.GoClass):
|
|
|
1493
1604
|
self.handle = args[0].handle
|
|
1494
1605
|
_whatsapp.IncRef(self.handle)
|
|
1495
1606
|
else:
|
|
1496
|
-
self.handle = _whatsapp.
|
|
1607
|
+
self.handle = _whatsapp.whatsapp_Avatar_CTor()
|
|
1497
1608
|
_whatsapp.IncRef(self.handle)
|
|
1498
1609
|
if 0 < len(args):
|
|
1499
|
-
self.
|
|
1500
|
-
if "
|
|
1501
|
-
self.
|
|
1610
|
+
self.ID = args[0]
|
|
1611
|
+
if "ID" in kwargs:
|
|
1612
|
+
self.ID = kwargs["ID"]
|
|
1502
1613
|
if 1 < len(args):
|
|
1503
|
-
self.
|
|
1504
|
-
if "
|
|
1505
|
-
self.
|
|
1614
|
+
self.URL = args[1]
|
|
1615
|
+
if "URL" in kwargs:
|
|
1616
|
+
self.URL = kwargs["URL"]
|
|
1506
1617
|
def __del__(self):
|
|
1507
1618
|
_whatsapp.DecRef(self.handle)
|
|
1508
1619
|
def __str__(self):
|
|
1509
1620
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1510
|
-
sv = 'whatsapp.
|
|
1621
|
+
sv = 'whatsapp.Avatar{'
|
|
1511
1622
|
first = True
|
|
1512
1623
|
for v in pr:
|
|
1513
1624
|
if callable(v[1]):
|
|
@@ -1520,33 +1631,33 @@ class Poll(go.GoClass):
|
|
|
1520
1631
|
return sv + '}'
|
|
1521
1632
|
def __repr__(self):
|
|
1522
1633
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1523
|
-
sv = 'whatsapp.
|
|
1634
|
+
sv = 'whatsapp.Avatar ( '
|
|
1524
1635
|
for v in pr:
|
|
1525
1636
|
if not callable(v[1]):
|
|
1526
1637
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1527
1638
|
return sv + ')'
|
|
1528
1639
|
@property
|
|
1529
|
-
def
|
|
1530
|
-
return _whatsapp.
|
|
1531
|
-
@
|
|
1532
|
-
def
|
|
1640
|
+
def ID(self):
|
|
1641
|
+
return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
|
|
1642
|
+
@ID.setter
|
|
1643
|
+
def ID(self, value):
|
|
1533
1644
|
if isinstance(value, go.GoClass):
|
|
1534
|
-
_whatsapp.
|
|
1645
|
+
_whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
|
|
1535
1646
|
else:
|
|
1536
|
-
_whatsapp.
|
|
1647
|
+
_whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
|
|
1537
1648
|
@property
|
|
1538
|
-
def
|
|
1539
|
-
return
|
|
1540
|
-
@
|
|
1541
|
-
def
|
|
1649
|
+
def URL(self):
|
|
1650
|
+
return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
|
|
1651
|
+
@URL.setter
|
|
1652
|
+
def URL(self, value):
|
|
1542
1653
|
if isinstance(value, go.GoClass):
|
|
1543
|
-
_whatsapp.
|
|
1654
|
+
_whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
|
|
1544
1655
|
else:
|
|
1545
|
-
|
|
1656
|
+
_whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
|
|
1546
1657
|
|
|
1547
|
-
# Python type for struct whatsapp.
|
|
1548
|
-
class
|
|
1549
|
-
"""A
|
|
1658
|
+
# Python type for struct whatsapp.Contact
|
|
1659
|
+
class Contact(go.GoClass):
|
|
1660
|
+
"""A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
|
|
1550
1661
|
def __init__(self, *args, **kwargs):
|
|
1551
1662
|
"""
|
|
1552
1663
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1560,29 +1671,21 @@ class Attachment(go.GoClass):
|
|
|
1560
1671
|
self.handle = args[0].handle
|
|
1561
1672
|
_whatsapp.IncRef(self.handle)
|
|
1562
1673
|
else:
|
|
1563
|
-
self.handle = _whatsapp.
|
|
1674
|
+
self.handle = _whatsapp.whatsapp_Contact_CTor()
|
|
1564
1675
|
_whatsapp.IncRef(self.handle)
|
|
1565
1676
|
if 0 < len(args):
|
|
1566
|
-
self.
|
|
1567
|
-
if "
|
|
1568
|
-
self.
|
|
1677
|
+
self.JID = args[0]
|
|
1678
|
+
if "JID" in kwargs:
|
|
1679
|
+
self.JID = kwargs["JID"]
|
|
1569
1680
|
if 1 < len(args):
|
|
1570
|
-
self.
|
|
1571
|
-
if "
|
|
1572
|
-
self.
|
|
1573
|
-
if 2 < len(args):
|
|
1574
|
-
self.Caption = args[2]
|
|
1575
|
-
if "Caption" in kwargs:
|
|
1576
|
-
self.Caption = kwargs["Caption"]
|
|
1577
|
-
if 3 < len(args):
|
|
1578
|
-
self.Data = args[3]
|
|
1579
|
-
if "Data" in kwargs:
|
|
1580
|
-
self.Data = kwargs["Data"]
|
|
1681
|
+
self.Name = args[1]
|
|
1682
|
+
if "Name" in kwargs:
|
|
1683
|
+
self.Name = kwargs["Name"]
|
|
1581
1684
|
def __del__(self):
|
|
1582
1685
|
_whatsapp.DecRef(self.handle)
|
|
1583
1686
|
def __str__(self):
|
|
1584
1687
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1585
|
-
sv = 'whatsapp.
|
|
1688
|
+
sv = 'whatsapp.Contact{'
|
|
1586
1689
|
first = True
|
|
1587
1690
|
for v in pr:
|
|
1588
1691
|
if callable(v[1]):
|
|
@@ -1595,57 +1698,33 @@ class Attachment(go.GoClass):
|
|
|
1595
1698
|
return sv + '}'
|
|
1596
1699
|
def __repr__(self):
|
|
1597
1700
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1598
|
-
sv = 'whatsapp.
|
|
1701
|
+
sv = 'whatsapp.Contact ( '
|
|
1599
1702
|
for v in pr:
|
|
1600
1703
|
if not callable(v[1]):
|
|
1601
1704
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1602
1705
|
return sv + ')'
|
|
1603
1706
|
@property
|
|
1604
|
-
def
|
|
1605
|
-
return _whatsapp.
|
|
1606
|
-
@
|
|
1607
|
-
def
|
|
1608
|
-
if isinstance(value, go.GoClass):
|
|
1609
|
-
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
|
|
1610
|
-
else:
|
|
1611
|
-
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
|
|
1612
|
-
@property
|
|
1613
|
-
def Filename(self):
|
|
1614
|
-
return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
|
|
1615
|
-
@Filename.setter
|
|
1616
|
-
def Filename(self, value):
|
|
1617
|
-
if isinstance(value, go.GoClass):
|
|
1618
|
-
_whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
|
|
1619
|
-
else:
|
|
1620
|
-
_whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
|
|
1621
|
-
@property
|
|
1622
|
-
def Caption(self):
|
|
1623
|
-
return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
|
|
1624
|
-
@Caption.setter
|
|
1625
|
-
def Caption(self, value):
|
|
1707
|
+
def JID(self):
|
|
1708
|
+
return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
|
|
1709
|
+
@JID.setter
|
|
1710
|
+
def JID(self, value):
|
|
1626
1711
|
if isinstance(value, go.GoClass):
|
|
1627
|
-
_whatsapp.
|
|
1712
|
+
_whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
|
|
1628
1713
|
else:
|
|
1629
|
-
_whatsapp.
|
|
1714
|
+
_whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
|
|
1630
1715
|
@property
|
|
1631
|
-
def
|
|
1632
|
-
return
|
|
1633
|
-
@
|
|
1634
|
-
def
|
|
1716
|
+
def Name(self):
|
|
1717
|
+
return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
|
|
1718
|
+
@Name.setter
|
|
1719
|
+
def Name(self, value):
|
|
1635
1720
|
if isinstance(value, go.GoClass):
|
|
1636
|
-
_whatsapp.
|
|
1721
|
+
_whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
|
|
1637
1722
|
else:
|
|
1638
|
-
|
|
1639
|
-
def GetSpec(self, ctx):
|
|
1640
|
-
"""GetSpec(object ctx) object, str
|
|
1641
|
-
|
|
1642
|
-
GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
|
|
1643
|
-
"""
|
|
1644
|
-
return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
|
|
1723
|
+
_whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
|
|
1645
1724
|
|
|
1646
|
-
# Python type for struct whatsapp.
|
|
1647
|
-
class
|
|
1648
|
-
"""
|
|
1725
|
+
# Python type for struct whatsapp.EventPayload
|
|
1726
|
+
class EventPayload(go.GoClass):
|
|
1727
|
+
"""EventPayload represents the collected payloads for all event types handled by the overarching\nsession adapter handler. Only specific fields will be populated in events emitted by internal\nhandlers, see documentation for specific types for more information.\n"""
|
|
1649
1728
|
def __init__(self, *args, **kwargs):
|
|
1650
1729
|
"""
|
|
1651
1730
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1659,73 +1738,164 @@ class Call(go.GoClass):
|
|
|
1659
1738
|
self.handle = args[0].handle
|
|
1660
1739
|
_whatsapp.IncRef(self.handle)
|
|
1661
1740
|
else:
|
|
1662
|
-
self.handle = _whatsapp.
|
|
1741
|
+
self.handle = _whatsapp.whatsapp_EventPayload_CTor()
|
|
1663
1742
|
_whatsapp.IncRef(self.handle)
|
|
1664
1743
|
if 0 < len(args):
|
|
1665
|
-
self.
|
|
1666
|
-
if "
|
|
1667
|
-
self.
|
|
1744
|
+
self.QRCode = args[0]
|
|
1745
|
+
if "QRCode" in kwargs:
|
|
1746
|
+
self.QRCode = kwargs["QRCode"]
|
|
1668
1747
|
if 1 < len(args):
|
|
1669
|
-
self.
|
|
1670
|
-
if "
|
|
1671
|
-
self.
|
|
1748
|
+
self.PairDeviceID = args[1]
|
|
1749
|
+
if "PairDeviceID" in kwargs:
|
|
1750
|
+
self.PairDeviceID = kwargs["PairDeviceID"]
|
|
1672
1751
|
if 2 < len(args):
|
|
1673
|
-
self.
|
|
1674
|
-
if "
|
|
1675
|
-
self.
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1752
|
+
self.Connect = args[2]
|
|
1753
|
+
if "Connect" in kwargs:
|
|
1754
|
+
self.Connect = kwargs["Connect"]
|
|
1755
|
+
if 3 < len(args):
|
|
1756
|
+
self.Contact = args[3]
|
|
1757
|
+
if "Contact" in kwargs:
|
|
1758
|
+
self.Contact = kwargs["Contact"]
|
|
1759
|
+
if 4 < len(args):
|
|
1760
|
+
self.Presence = args[4]
|
|
1761
|
+
if "Presence" in kwargs:
|
|
1762
|
+
self.Presence = kwargs["Presence"]
|
|
1763
|
+
if 5 < len(args):
|
|
1764
|
+
self.Message = args[5]
|
|
1765
|
+
if "Message" in kwargs:
|
|
1766
|
+
self.Message = kwargs["Message"]
|
|
1767
|
+
if 6 < len(args):
|
|
1768
|
+
self.ChatState = args[6]
|
|
1769
|
+
if "ChatState" in kwargs:
|
|
1770
|
+
self.ChatState = kwargs["ChatState"]
|
|
1771
|
+
if 7 < len(args):
|
|
1772
|
+
self.Receipt = args[7]
|
|
1773
|
+
if "Receipt" in kwargs:
|
|
1774
|
+
self.Receipt = kwargs["Receipt"]
|
|
1775
|
+
if 8 < len(args):
|
|
1776
|
+
self.Group = args[8]
|
|
1777
|
+
if "Group" in kwargs:
|
|
1778
|
+
self.Group = kwargs["Group"]
|
|
1779
|
+
if 9 < len(args):
|
|
1780
|
+
self.Call = args[9]
|
|
1781
|
+
if "Call" in kwargs:
|
|
1782
|
+
self.Call = kwargs["Call"]
|
|
1783
|
+
def __del__(self):
|
|
1784
|
+
_whatsapp.DecRef(self.handle)
|
|
1785
|
+
def __str__(self):
|
|
1786
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1787
|
+
sv = 'whatsapp.EventPayload{'
|
|
1788
|
+
first = True
|
|
1789
|
+
for v in pr:
|
|
1790
|
+
if callable(v[1]):
|
|
1791
|
+
continue
|
|
1792
|
+
if first:
|
|
1793
|
+
first = False
|
|
1794
|
+
else:
|
|
1795
|
+
sv += ', '
|
|
1796
|
+
sv += v[0] + '=' + str(v[1])
|
|
1690
1797
|
return sv + '}'
|
|
1691
1798
|
def __repr__(self):
|
|
1692
1799
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1693
|
-
sv = 'whatsapp.
|
|
1800
|
+
sv = 'whatsapp.EventPayload ( '
|
|
1694
1801
|
for v in pr:
|
|
1695
1802
|
if not callable(v[1]):
|
|
1696
1803
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1697
1804
|
return sv + ')'
|
|
1698
1805
|
@property
|
|
1699
|
-
def
|
|
1700
|
-
return _whatsapp.
|
|
1701
|
-
@
|
|
1702
|
-
def
|
|
1806
|
+
def QRCode(self):
|
|
1807
|
+
return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
|
|
1808
|
+
@QRCode.setter
|
|
1809
|
+
def QRCode(self, value):
|
|
1703
1810
|
if isinstance(value, go.GoClass):
|
|
1704
|
-
_whatsapp.
|
|
1811
|
+
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
|
|
1705
1812
|
else:
|
|
1706
|
-
_whatsapp.
|
|
1813
|
+
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
|
|
1707
1814
|
@property
|
|
1708
|
-
def
|
|
1709
|
-
return _whatsapp.
|
|
1710
|
-
@
|
|
1711
|
-
def
|
|
1815
|
+
def PairDeviceID(self):
|
|
1816
|
+
return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
|
|
1817
|
+
@PairDeviceID.setter
|
|
1818
|
+
def PairDeviceID(self, value):
|
|
1712
1819
|
if isinstance(value, go.GoClass):
|
|
1713
|
-
_whatsapp.
|
|
1820
|
+
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
|
|
1714
1821
|
else:
|
|
1715
|
-
_whatsapp.
|
|
1822
|
+
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
|
|
1716
1823
|
@property
|
|
1717
|
-
def
|
|
1718
|
-
return _whatsapp.
|
|
1719
|
-
@
|
|
1720
|
-
def
|
|
1824
|
+
def Connect(self):
|
|
1825
|
+
return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
|
|
1826
|
+
@Connect.setter
|
|
1827
|
+
def Connect(self, value):
|
|
1721
1828
|
if isinstance(value, go.GoClass):
|
|
1722
|
-
_whatsapp.
|
|
1829
|
+
_whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
|
|
1723
1830
|
else:
|
|
1724
|
-
|
|
1831
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1832
|
+
@property
|
|
1833
|
+
def Contact(self):
|
|
1834
|
+
return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
|
|
1835
|
+
@Contact.setter
|
|
1836
|
+
def Contact(self, value):
|
|
1837
|
+
if isinstance(value, go.GoClass):
|
|
1838
|
+
_whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
|
|
1839
|
+
else:
|
|
1840
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1841
|
+
@property
|
|
1842
|
+
def Presence(self):
|
|
1843
|
+
return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
|
|
1844
|
+
@Presence.setter
|
|
1845
|
+
def Presence(self, value):
|
|
1846
|
+
if isinstance(value, go.GoClass):
|
|
1847
|
+
_whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
|
|
1848
|
+
else:
|
|
1849
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1850
|
+
@property
|
|
1851
|
+
def Message(self):
|
|
1852
|
+
return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
|
|
1853
|
+
@Message.setter
|
|
1854
|
+
def Message(self, value):
|
|
1855
|
+
if isinstance(value, go.GoClass):
|
|
1856
|
+
_whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
|
|
1857
|
+
else:
|
|
1858
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1859
|
+
@property
|
|
1860
|
+
def ChatState(self):
|
|
1861
|
+
return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
|
|
1862
|
+
@ChatState.setter
|
|
1863
|
+
def ChatState(self, value):
|
|
1864
|
+
if isinstance(value, go.GoClass):
|
|
1865
|
+
_whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
|
|
1866
|
+
else:
|
|
1867
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1868
|
+
@property
|
|
1869
|
+
def Receipt(self):
|
|
1870
|
+
return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
|
|
1871
|
+
@Receipt.setter
|
|
1872
|
+
def Receipt(self, value):
|
|
1873
|
+
if isinstance(value, go.GoClass):
|
|
1874
|
+
_whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
|
|
1875
|
+
else:
|
|
1876
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1877
|
+
@property
|
|
1878
|
+
def Group(self):
|
|
1879
|
+
return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
|
|
1880
|
+
@Group.setter
|
|
1881
|
+
def Group(self, value):
|
|
1882
|
+
if isinstance(value, go.GoClass):
|
|
1883
|
+
_whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
|
|
1884
|
+
else:
|
|
1885
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1886
|
+
@property
|
|
1887
|
+
def Call(self):
|
|
1888
|
+
return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
|
|
1889
|
+
@Call.setter
|
|
1890
|
+
def Call(self, value):
|
|
1891
|
+
if isinstance(value, go.GoClass):
|
|
1892
|
+
_whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
|
|
1893
|
+
else:
|
|
1894
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1725
1895
|
|
|
1726
|
-
# Python type for struct whatsapp.
|
|
1727
|
-
class
|
|
1728
|
-
"""A
|
|
1896
|
+
# Python type for struct whatsapp.Group
|
|
1897
|
+
class Group(go.GoClass):
|
|
1898
|
+
"""A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
|
|
1729
1899
|
def __init__(self, *args, **kwargs):
|
|
1730
1900
|
"""
|
|
1731
1901
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1739,29 +1909,33 @@ class Gateway(go.GoClass):
|
|
|
1739
1909
|
self.handle = args[0].handle
|
|
1740
1910
|
_whatsapp.IncRef(self.handle)
|
|
1741
1911
|
else:
|
|
1742
|
-
self.handle = _whatsapp.
|
|
1912
|
+
self.handle = _whatsapp.whatsapp_Group_CTor()
|
|
1743
1913
|
_whatsapp.IncRef(self.handle)
|
|
1744
1914
|
if 0 < len(args):
|
|
1745
|
-
self.
|
|
1746
|
-
if "
|
|
1747
|
-
self.
|
|
1915
|
+
self.JID = args[0]
|
|
1916
|
+
if "JID" in kwargs:
|
|
1917
|
+
self.JID = kwargs["JID"]
|
|
1748
1918
|
if 1 < len(args):
|
|
1749
1919
|
self.Name = args[1]
|
|
1750
1920
|
if "Name" in kwargs:
|
|
1751
1921
|
self.Name = kwargs["Name"]
|
|
1752
1922
|
if 2 < len(args):
|
|
1753
|
-
self.
|
|
1754
|
-
if "
|
|
1755
|
-
self.
|
|
1923
|
+
self.Subject = args[2]
|
|
1924
|
+
if "Subject" in kwargs:
|
|
1925
|
+
self.Subject = kwargs["Subject"]
|
|
1756
1926
|
if 3 < len(args):
|
|
1757
|
-
self.
|
|
1758
|
-
if "
|
|
1759
|
-
self.
|
|
1927
|
+
self.Nickname = args[3]
|
|
1928
|
+
if "Nickname" in kwargs:
|
|
1929
|
+
self.Nickname = kwargs["Nickname"]
|
|
1930
|
+
if 4 < len(args):
|
|
1931
|
+
self.Participants = args[4]
|
|
1932
|
+
if "Participants" in kwargs:
|
|
1933
|
+
self.Participants = kwargs["Participants"]
|
|
1760
1934
|
def __del__(self):
|
|
1761
1935
|
_whatsapp.DecRef(self.handle)
|
|
1762
1936
|
def __str__(self):
|
|
1763
1937
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1764
|
-
sv = 'whatsapp.
|
|
1938
|
+
sv = 'whatsapp.Group{'
|
|
1765
1939
|
first = True
|
|
1766
1940
|
for v in pr:
|
|
1767
1941
|
if callable(v[1]):
|
|
@@ -1774,68 +1948,56 @@ class Gateway(go.GoClass):
|
|
|
1774
1948
|
return sv + '}'
|
|
1775
1949
|
def __repr__(self):
|
|
1776
1950
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1777
|
-
sv = 'whatsapp.
|
|
1951
|
+
sv = 'whatsapp.Group ( '
|
|
1778
1952
|
for v in pr:
|
|
1779
1953
|
if not callable(v[1]):
|
|
1780
1954
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1781
1955
|
return sv + ')'
|
|
1782
1956
|
@property
|
|
1783
|
-
def
|
|
1784
|
-
return _whatsapp.
|
|
1785
|
-
@
|
|
1786
|
-
def
|
|
1957
|
+
def JID(self):
|
|
1958
|
+
return _whatsapp.whatsapp_Group_JID_Get(self.handle)
|
|
1959
|
+
@JID.setter
|
|
1960
|
+
def JID(self, value):
|
|
1787
1961
|
if isinstance(value, go.GoClass):
|
|
1788
|
-
_whatsapp.
|
|
1962
|
+
_whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
|
|
1789
1963
|
else:
|
|
1790
|
-
_whatsapp.
|
|
1964
|
+
_whatsapp.whatsapp_Group_JID_Set(self.handle, value)
|
|
1791
1965
|
@property
|
|
1792
1966
|
def Name(self):
|
|
1793
|
-
return _whatsapp.
|
|
1967
|
+
return _whatsapp.whatsapp_Group_Name_Get(self.handle)
|
|
1794
1968
|
@Name.setter
|
|
1795
1969
|
def Name(self, value):
|
|
1796
1970
|
if isinstance(value, go.GoClass):
|
|
1797
|
-
_whatsapp.
|
|
1971
|
+
_whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
|
|
1798
1972
|
else:
|
|
1799
|
-
_whatsapp.
|
|
1973
|
+
_whatsapp.whatsapp_Group_Name_Set(self.handle, value)
|
|
1800
1974
|
@property
|
|
1801
|
-
def
|
|
1802
|
-
return _whatsapp.
|
|
1803
|
-
@
|
|
1804
|
-
def
|
|
1975
|
+
def Subject(self):
|
|
1976
|
+
return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
|
|
1977
|
+
@Subject.setter
|
|
1978
|
+
def Subject(self, value):
|
|
1805
1979
|
if isinstance(value, go.GoClass):
|
|
1806
|
-
_whatsapp.
|
|
1980
|
+
_whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
|
|
1807
1981
|
else:
|
|
1808
|
-
|
|
1982
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1809
1983
|
@property
|
|
1810
|
-
def
|
|
1811
|
-
return _whatsapp.
|
|
1812
|
-
@
|
|
1813
|
-
def
|
|
1984
|
+
def Nickname(self):
|
|
1985
|
+
return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
|
|
1986
|
+
@Nickname.setter
|
|
1987
|
+
def Nickname(self, value):
|
|
1814
1988
|
if isinstance(value, go.GoClass):
|
|
1815
|
-
_whatsapp.
|
|
1989
|
+
_whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
|
|
1816
1990
|
else:
|
|
1817
|
-
_whatsapp.
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
|
|
1829
|
-
a valid ID, a pair operation will be required, as described in [Session.Login].
|
|
1830
|
-
"""
|
|
1831
|
-
return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
|
|
1832
|
-
def CleanupSession(self, device):
|
|
1833
|
-
"""CleanupSession(object device) str
|
|
1834
|
-
|
|
1835
|
-
CleanupSession will remove all invalid and obsolete references to the given device, and should be
|
|
1836
|
-
used when pairing a new device or unregistering from the Gateway.
|
|
1837
|
-
"""
|
|
1838
|
-
return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
|
|
1991
|
+
_whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
|
|
1992
|
+
@property
|
|
1993
|
+
def Participants(self):
|
|
1994
|
+
return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
|
|
1995
|
+
@Participants.setter
|
|
1996
|
+
def Participants(self, value):
|
|
1997
|
+
if isinstance(value, go.GoClass):
|
|
1998
|
+
_whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
|
|
1999
|
+
else:
|
|
2000
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1839
2001
|
|
|
1840
2002
|
# Python type for struct whatsapp.GroupParticipant
|
|
1841
2003
|
class GroupParticipant(go.GoClass):
|
|
@@ -1997,10 +2159,10 @@ class GroupSubject(go.GoClass):
|
|
|
1997
2159
|
else:
|
|
1998
2160
|
_whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
|
|
1999
2161
|
|
|
2000
|
-
# Python type for struct whatsapp.
|
|
2001
|
-
class
|
|
2002
|
-
"""A
|
|
2003
|
-
def __init__(self, *args, **kwargs):
|
|
2162
|
+
# Python type for struct whatsapp.Message
|
|
2163
|
+
class Message(go.GoClass):
|
|
2164
|
+
"""A Message represents one of many kinds of bidirectional communication payloads, for example, a\ntext message, a file (image, video) attachment, an emoji reaction, etc. Messages of different\nkinds are denoted as such, and re-use fields where the semantics overlap.\n"""
|
|
2165
|
+
def __init__(self, *args, **kwargs):
|
|
2004
2166
|
"""
|
|
2005
2167
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2006
2168
|
otherwise parameters can be unnamed in order of field names or named fields
|
|
@@ -2013,33 +2175,89 @@ class Preview(go.GoClass):
|
|
|
2013
2175
|
self.handle = args[0].handle
|
|
2014
2176
|
_whatsapp.IncRef(self.handle)
|
|
2015
2177
|
else:
|
|
2016
|
-
self.handle = _whatsapp.
|
|
2178
|
+
self.handle = _whatsapp.whatsapp_Message_CTor()
|
|
2017
2179
|
_whatsapp.IncRef(self.handle)
|
|
2018
2180
|
if 0 < len(args):
|
|
2019
2181
|
self.Kind = args[0]
|
|
2020
2182
|
if "Kind" in kwargs:
|
|
2021
2183
|
self.Kind = kwargs["Kind"]
|
|
2022
2184
|
if 1 < len(args):
|
|
2023
|
-
self.
|
|
2024
|
-
if "
|
|
2025
|
-
self.
|
|
2185
|
+
self.ID = args[1]
|
|
2186
|
+
if "ID" in kwargs:
|
|
2187
|
+
self.ID = kwargs["ID"]
|
|
2026
2188
|
if 2 < len(args):
|
|
2027
|
-
self.
|
|
2028
|
-
if "
|
|
2029
|
-
self.
|
|
2189
|
+
self.JID = args[2]
|
|
2190
|
+
if "JID" in kwargs:
|
|
2191
|
+
self.JID = kwargs["JID"]
|
|
2030
2192
|
if 3 < len(args):
|
|
2031
|
-
self.
|
|
2032
|
-
if "
|
|
2033
|
-
self.
|
|
2193
|
+
self.GroupJID = args[3]
|
|
2194
|
+
if "GroupJID" in kwargs:
|
|
2195
|
+
self.GroupJID = kwargs["GroupJID"]
|
|
2034
2196
|
if 4 < len(args):
|
|
2035
|
-
self.
|
|
2036
|
-
if "
|
|
2037
|
-
self.
|
|
2197
|
+
self.OriginJID = args[4]
|
|
2198
|
+
if "OriginJID" in kwargs:
|
|
2199
|
+
self.OriginJID = kwargs["OriginJID"]
|
|
2200
|
+
if 5 < len(args):
|
|
2201
|
+
self.Body = args[5]
|
|
2202
|
+
if "Body" in kwargs:
|
|
2203
|
+
self.Body = kwargs["Body"]
|
|
2204
|
+
if 6 < len(args):
|
|
2205
|
+
self.Timestamp = args[6]
|
|
2206
|
+
if "Timestamp" in kwargs:
|
|
2207
|
+
self.Timestamp = kwargs["Timestamp"]
|
|
2208
|
+
if 7 < len(args):
|
|
2209
|
+
self.IsCarbon = args[7]
|
|
2210
|
+
if "IsCarbon" in kwargs:
|
|
2211
|
+
self.IsCarbon = kwargs["IsCarbon"]
|
|
2212
|
+
if 8 < len(args):
|
|
2213
|
+
self.IsForwarded = args[8]
|
|
2214
|
+
if "IsForwarded" in kwargs:
|
|
2215
|
+
self.IsForwarded = kwargs["IsForwarded"]
|
|
2216
|
+
if 9 < len(args):
|
|
2217
|
+
self.ReplyID = args[9]
|
|
2218
|
+
if "ReplyID" in kwargs:
|
|
2219
|
+
self.ReplyID = kwargs["ReplyID"]
|
|
2220
|
+
if 10 < len(args):
|
|
2221
|
+
self.ReplyBody = args[10]
|
|
2222
|
+
if "ReplyBody" in kwargs:
|
|
2223
|
+
self.ReplyBody = kwargs["ReplyBody"]
|
|
2224
|
+
if 11 < len(args):
|
|
2225
|
+
self.Attachments = args[11]
|
|
2226
|
+
if "Attachments" in kwargs:
|
|
2227
|
+
self.Attachments = kwargs["Attachments"]
|
|
2228
|
+
if 12 < len(args):
|
|
2229
|
+
self.Preview = args[12]
|
|
2230
|
+
if "Preview" in kwargs:
|
|
2231
|
+
self.Preview = kwargs["Preview"]
|
|
2232
|
+
if 13 < len(args):
|
|
2233
|
+
self.Location = args[13]
|
|
2234
|
+
if "Location" in kwargs:
|
|
2235
|
+
self.Location = kwargs["Location"]
|
|
2236
|
+
if 14 < len(args):
|
|
2237
|
+
self.Poll = args[14]
|
|
2238
|
+
if "Poll" in kwargs:
|
|
2239
|
+
self.Poll = kwargs["Poll"]
|
|
2240
|
+
if 15 < len(args):
|
|
2241
|
+
self.Album = args[15]
|
|
2242
|
+
if "Album" in kwargs:
|
|
2243
|
+
self.Album = kwargs["Album"]
|
|
2244
|
+
if 16 < len(args):
|
|
2245
|
+
self.MentionJIDs = args[16]
|
|
2246
|
+
if "MentionJIDs" in kwargs:
|
|
2247
|
+
self.MentionJIDs = kwargs["MentionJIDs"]
|
|
2248
|
+
if 17 < len(args):
|
|
2249
|
+
self.Receipts = args[17]
|
|
2250
|
+
if "Receipts" in kwargs:
|
|
2251
|
+
self.Receipts = kwargs["Receipts"]
|
|
2252
|
+
if 18 < len(args):
|
|
2253
|
+
self.Reactions = args[18]
|
|
2254
|
+
if "Reactions" in kwargs:
|
|
2255
|
+
self.Reactions = kwargs["Reactions"]
|
|
2038
2256
|
def __del__(self):
|
|
2039
2257
|
_whatsapp.DecRef(self.handle)
|
|
2040
2258
|
def __str__(self):
|
|
2041
2259
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2042
|
-
sv = 'whatsapp.
|
|
2260
|
+
sv = 'whatsapp.Message{'
|
|
2043
2261
|
first = True
|
|
2044
2262
|
for v in pr:
|
|
2045
2263
|
if callable(v[1]):
|
|
@@ -2052,127 +2270,186 @@ class Preview(go.GoClass):
|
|
|
2052
2270
|
return sv + '}'
|
|
2053
2271
|
def __repr__(self):
|
|
2054
2272
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2055
|
-
sv = 'whatsapp.
|
|
2273
|
+
sv = 'whatsapp.Message ( '
|
|
2056
2274
|
for v in pr:
|
|
2057
2275
|
if not callable(v[1]):
|
|
2058
2276
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2059
2277
|
return sv + ')'
|
|
2060
2278
|
@property
|
|
2061
2279
|
def Kind(self):
|
|
2062
|
-
return _whatsapp.
|
|
2280
|
+
return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
|
|
2063
2281
|
@Kind.setter
|
|
2064
2282
|
def Kind(self, value):
|
|
2065
2283
|
if isinstance(value, go.GoClass):
|
|
2066
|
-
_whatsapp.
|
|
2284
|
+
_whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
|
|
2067
2285
|
else:
|
|
2068
|
-
_whatsapp.
|
|
2286
|
+
_whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
|
|
2069
2287
|
@property
|
|
2070
|
-
def
|
|
2071
|
-
return _whatsapp.
|
|
2072
|
-
@
|
|
2073
|
-
def
|
|
2288
|
+
def ID(self):
|
|
2289
|
+
return _whatsapp.whatsapp_Message_ID_Get(self.handle)
|
|
2290
|
+
@ID.setter
|
|
2291
|
+
def ID(self, value):
|
|
2074
2292
|
if isinstance(value, go.GoClass):
|
|
2075
|
-
_whatsapp.
|
|
2293
|
+
_whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
|
|
2076
2294
|
else:
|
|
2077
|
-
_whatsapp.
|
|
2295
|
+
_whatsapp.whatsapp_Message_ID_Set(self.handle, value)
|
|
2078
2296
|
@property
|
|
2079
|
-
def
|
|
2080
|
-
return _whatsapp.
|
|
2081
|
-
@
|
|
2082
|
-
def
|
|
2297
|
+
def JID(self):
|
|
2298
|
+
return _whatsapp.whatsapp_Message_JID_Get(self.handle)
|
|
2299
|
+
@JID.setter
|
|
2300
|
+
def JID(self, value):
|
|
2083
2301
|
if isinstance(value, go.GoClass):
|
|
2084
|
-
_whatsapp.
|
|
2302
|
+
_whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
|
|
2085
2303
|
else:
|
|
2086
|
-
_whatsapp.
|
|
2304
|
+
_whatsapp.whatsapp_Message_JID_Set(self.handle, value)
|
|
2087
2305
|
@property
|
|
2088
|
-
def
|
|
2089
|
-
return _whatsapp.
|
|
2090
|
-
@
|
|
2091
|
-
def
|
|
2306
|
+
def GroupJID(self):
|
|
2307
|
+
return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
|
|
2308
|
+
@GroupJID.setter
|
|
2309
|
+
def GroupJID(self, value):
|
|
2092
2310
|
if isinstance(value, go.GoClass):
|
|
2093
|
-
_whatsapp.
|
|
2311
|
+
_whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
|
|
2094
2312
|
else:
|
|
2095
|
-
_whatsapp.
|
|
2313
|
+
_whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
|
|
2096
2314
|
@property
|
|
2097
|
-
def
|
|
2098
|
-
return
|
|
2099
|
-
@
|
|
2100
|
-
def
|
|
2315
|
+
def OriginJID(self):
|
|
2316
|
+
return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
|
|
2317
|
+
@OriginJID.setter
|
|
2318
|
+
def OriginJID(self, value):
|
|
2101
2319
|
if isinstance(value, go.GoClass):
|
|
2102
|
-
_whatsapp.
|
|
2320
|
+
_whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
|
|
2321
|
+
else:
|
|
2322
|
+
_whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
|
|
2323
|
+
@property
|
|
2324
|
+
def Body(self):
|
|
2325
|
+
return _whatsapp.whatsapp_Message_Body_Get(self.handle)
|
|
2326
|
+
@Body.setter
|
|
2327
|
+
def Body(self, value):
|
|
2328
|
+
if isinstance(value, go.GoClass):
|
|
2329
|
+
_whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
|
|
2330
|
+
else:
|
|
2331
|
+
_whatsapp.whatsapp_Message_Body_Set(self.handle, value)
|
|
2332
|
+
@property
|
|
2333
|
+
def Timestamp(self):
|
|
2334
|
+
return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
|
|
2335
|
+
@Timestamp.setter
|
|
2336
|
+
def Timestamp(self, value):
|
|
2337
|
+
if isinstance(value, go.GoClass):
|
|
2338
|
+
_whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
|
|
2339
|
+
else:
|
|
2340
|
+
_whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
|
|
2341
|
+
@property
|
|
2342
|
+
def IsCarbon(self):
|
|
2343
|
+
return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
|
|
2344
|
+
@IsCarbon.setter
|
|
2345
|
+
def IsCarbon(self, value):
|
|
2346
|
+
if isinstance(value, go.GoClass):
|
|
2347
|
+
_whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
|
|
2348
|
+
else:
|
|
2349
|
+
_whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
|
|
2350
|
+
@property
|
|
2351
|
+
def IsForwarded(self):
|
|
2352
|
+
return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
|
|
2353
|
+
@IsForwarded.setter
|
|
2354
|
+
def IsForwarded(self, value):
|
|
2355
|
+
if isinstance(value, go.GoClass):
|
|
2356
|
+
_whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
|
|
2357
|
+
else:
|
|
2358
|
+
_whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
|
|
2359
|
+
@property
|
|
2360
|
+
def ReplyID(self):
|
|
2361
|
+
return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
|
|
2362
|
+
@ReplyID.setter
|
|
2363
|
+
def ReplyID(self, value):
|
|
2364
|
+
if isinstance(value, go.GoClass):
|
|
2365
|
+
_whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
|
|
2366
|
+
else:
|
|
2367
|
+
_whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
|
|
2368
|
+
@property
|
|
2369
|
+
def ReplyBody(self):
|
|
2370
|
+
return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
|
|
2371
|
+
@ReplyBody.setter
|
|
2372
|
+
def ReplyBody(self, value):
|
|
2373
|
+
if isinstance(value, go.GoClass):
|
|
2374
|
+
_whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
|
|
2375
|
+
else:
|
|
2376
|
+
_whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
|
|
2377
|
+
@property
|
|
2378
|
+
def Attachments(self):
|
|
2379
|
+
return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
|
|
2380
|
+
@Attachments.setter
|
|
2381
|
+
def Attachments(self, value):
|
|
2382
|
+
if isinstance(value, go.GoClass):
|
|
2383
|
+
_whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
|
|
2103
2384
|
else:
|
|
2104
2385
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
def
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
|
2113
|
-
in which case a new Go object is constructed first
|
|
2114
|
-
"""
|
|
2115
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2116
|
-
self.handle = kwargs['handle']
|
|
2117
|
-
_whatsapp.IncRef(self.handle)
|
|
2118
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
2119
|
-
self.handle = args[0].handle
|
|
2120
|
-
_whatsapp.IncRef(self.handle)
|
|
2386
|
+
@property
|
|
2387
|
+
def Preview(self):
|
|
2388
|
+
return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
|
|
2389
|
+
@Preview.setter
|
|
2390
|
+
def Preview(self, value):
|
|
2391
|
+
if isinstance(value, go.GoClass):
|
|
2392
|
+
_whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
|
|
2121
2393
|
else:
|
|
2122
|
-
|
|
2123
|
-
_whatsapp.IncRef(self.handle)
|
|
2124
|
-
if 0 < len(args):
|
|
2125
|
-
self.ID = args[0]
|
|
2126
|
-
if "ID" in kwargs:
|
|
2127
|
-
self.ID = kwargs["ID"]
|
|
2128
|
-
if 1 < len(args):
|
|
2129
|
-
self.URL = args[1]
|
|
2130
|
-
if "URL" in kwargs:
|
|
2131
|
-
self.URL = kwargs["URL"]
|
|
2132
|
-
def __del__(self):
|
|
2133
|
-
_whatsapp.DecRef(self.handle)
|
|
2134
|
-
def __str__(self):
|
|
2135
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2136
|
-
sv = 'whatsapp.Avatar{'
|
|
2137
|
-
first = True
|
|
2138
|
-
for v in pr:
|
|
2139
|
-
if callable(v[1]):
|
|
2140
|
-
continue
|
|
2141
|
-
if first:
|
|
2142
|
-
first = False
|
|
2143
|
-
else:
|
|
2144
|
-
sv += ', '
|
|
2145
|
-
sv += v[0] + '=' + str(v[1])
|
|
2146
|
-
return sv + '}'
|
|
2147
|
-
def __repr__(self):
|
|
2148
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2149
|
-
sv = 'whatsapp.Avatar ( '
|
|
2150
|
-
for v in pr:
|
|
2151
|
-
if not callable(v[1]):
|
|
2152
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2153
|
-
return sv + ')'
|
|
2394
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2154
2395
|
@property
|
|
2155
|
-
def
|
|
2156
|
-
return _whatsapp.
|
|
2157
|
-
@
|
|
2158
|
-
def
|
|
2396
|
+
def Location(self):
|
|
2397
|
+
return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
|
|
2398
|
+
@Location.setter
|
|
2399
|
+
def Location(self, value):
|
|
2159
2400
|
if isinstance(value, go.GoClass):
|
|
2160
|
-
_whatsapp.
|
|
2401
|
+
_whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
|
|
2161
2402
|
else:
|
|
2162
|
-
|
|
2403
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2163
2404
|
@property
|
|
2164
|
-
def
|
|
2165
|
-
return _whatsapp.
|
|
2166
|
-
@
|
|
2167
|
-
def
|
|
2405
|
+
def Poll(self):
|
|
2406
|
+
return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
|
|
2407
|
+
@Poll.setter
|
|
2408
|
+
def Poll(self, value):
|
|
2168
2409
|
if isinstance(value, go.GoClass):
|
|
2169
|
-
_whatsapp.
|
|
2410
|
+
_whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
|
|
2170
2411
|
else:
|
|
2171
|
-
|
|
2412
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2413
|
+
@property
|
|
2414
|
+
def Album(self):
|
|
2415
|
+
return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
|
|
2416
|
+
@Album.setter
|
|
2417
|
+
def Album(self, value):
|
|
2418
|
+
if isinstance(value, go.GoClass):
|
|
2419
|
+
_whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
|
|
2420
|
+
else:
|
|
2421
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2422
|
+
@property
|
|
2423
|
+
def MentionJIDs(self):
|
|
2424
|
+
return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
|
|
2425
|
+
@MentionJIDs.setter
|
|
2426
|
+
def MentionJIDs(self, value):
|
|
2427
|
+
if isinstance(value, go.GoClass):
|
|
2428
|
+
_whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
|
|
2429
|
+
else:
|
|
2430
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2431
|
+
@property
|
|
2432
|
+
def Receipts(self):
|
|
2433
|
+
return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
|
|
2434
|
+
@Receipts.setter
|
|
2435
|
+
def Receipts(self, value):
|
|
2436
|
+
if isinstance(value, go.GoClass):
|
|
2437
|
+
_whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
|
|
2438
|
+
else:
|
|
2439
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2440
|
+
@property
|
|
2441
|
+
def Reactions(self):
|
|
2442
|
+
return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
|
|
2443
|
+
@Reactions.setter
|
|
2444
|
+
def Reactions(self, value):
|
|
2445
|
+
if isinstance(value, go.GoClass):
|
|
2446
|
+
_whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
|
|
2447
|
+
else:
|
|
2448
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2172
2449
|
|
|
2173
|
-
# Python type for struct whatsapp.
|
|
2174
|
-
class
|
|
2175
|
-
"""
|
|
2450
|
+
# Python type for struct whatsapp.Attachment
|
|
2451
|
+
class Attachment(go.GoClass):
|
|
2452
|
+
"""A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
|
|
2176
2453
|
def __init__(self, *args, **kwargs):
|
|
2177
2454
|
"""
|
|
2178
2455
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2186,53 +2463,29 @@ class EventPayload(go.GoClass):
|
|
|
2186
2463
|
self.handle = args[0].handle
|
|
2187
2464
|
_whatsapp.IncRef(self.handle)
|
|
2188
2465
|
else:
|
|
2189
|
-
self.handle = _whatsapp.
|
|
2466
|
+
self.handle = _whatsapp.whatsapp_Attachment_CTor()
|
|
2190
2467
|
_whatsapp.IncRef(self.handle)
|
|
2191
2468
|
if 0 < len(args):
|
|
2192
|
-
self.
|
|
2193
|
-
if "
|
|
2194
|
-
self.
|
|
2469
|
+
self.MIME = args[0]
|
|
2470
|
+
if "MIME" in kwargs:
|
|
2471
|
+
self.MIME = kwargs["MIME"]
|
|
2195
2472
|
if 1 < len(args):
|
|
2196
|
-
self.
|
|
2197
|
-
if "
|
|
2198
|
-
self.
|
|
2199
|
-
if 2 < len(args):
|
|
2200
|
-
self.
|
|
2201
|
-
if "
|
|
2202
|
-
self.
|
|
2203
|
-
if 3 < len(args):
|
|
2204
|
-
self.
|
|
2205
|
-
if "
|
|
2206
|
-
self.
|
|
2207
|
-
if 4 < len(args):
|
|
2208
|
-
self.Presence = args[4]
|
|
2209
|
-
if "Presence" in kwargs:
|
|
2210
|
-
self.Presence = kwargs["Presence"]
|
|
2211
|
-
if 5 < len(args):
|
|
2212
|
-
self.Message = args[5]
|
|
2213
|
-
if "Message" in kwargs:
|
|
2214
|
-
self.Message = kwargs["Message"]
|
|
2215
|
-
if 6 < len(args):
|
|
2216
|
-
self.ChatState = args[6]
|
|
2217
|
-
if "ChatState" in kwargs:
|
|
2218
|
-
self.ChatState = kwargs["ChatState"]
|
|
2219
|
-
if 7 < len(args):
|
|
2220
|
-
self.Receipt = args[7]
|
|
2221
|
-
if "Receipt" in kwargs:
|
|
2222
|
-
self.Receipt = kwargs["Receipt"]
|
|
2223
|
-
if 8 < len(args):
|
|
2224
|
-
self.Group = args[8]
|
|
2225
|
-
if "Group" in kwargs:
|
|
2226
|
-
self.Group = kwargs["Group"]
|
|
2227
|
-
if 9 < len(args):
|
|
2228
|
-
self.Call = args[9]
|
|
2229
|
-
if "Call" in kwargs:
|
|
2230
|
-
self.Call = kwargs["Call"]
|
|
2473
|
+
self.Filename = args[1]
|
|
2474
|
+
if "Filename" in kwargs:
|
|
2475
|
+
self.Filename = kwargs["Filename"]
|
|
2476
|
+
if 2 < len(args):
|
|
2477
|
+
self.Caption = args[2]
|
|
2478
|
+
if "Caption" in kwargs:
|
|
2479
|
+
self.Caption = kwargs["Caption"]
|
|
2480
|
+
if 3 < len(args):
|
|
2481
|
+
self.Data = args[3]
|
|
2482
|
+
if "Data" in kwargs:
|
|
2483
|
+
self.Data = kwargs["Data"]
|
|
2231
2484
|
def __del__(self):
|
|
2232
2485
|
_whatsapp.DecRef(self.handle)
|
|
2233
2486
|
def __str__(self):
|
|
2234
2487
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2235
|
-
sv = 'whatsapp.
|
|
2488
|
+
sv = 'whatsapp.Attachment{'
|
|
2236
2489
|
first = True
|
|
2237
2490
|
for v in pr:
|
|
2238
2491
|
if callable(v[1]):
|
|
@@ -2245,105 +2498,57 @@ class EventPayload(go.GoClass):
|
|
|
2245
2498
|
return sv + '}'
|
|
2246
2499
|
def __repr__(self):
|
|
2247
2500
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2248
|
-
sv = 'whatsapp.
|
|
2501
|
+
sv = 'whatsapp.Attachment ( '
|
|
2249
2502
|
for v in pr:
|
|
2250
2503
|
if not callable(v[1]):
|
|
2251
2504
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2252
2505
|
return sv + ')'
|
|
2253
2506
|
@property
|
|
2254
|
-
def
|
|
2255
|
-
return _whatsapp.
|
|
2256
|
-
@
|
|
2257
|
-
def
|
|
2258
|
-
if isinstance(value, go.GoClass):
|
|
2259
|
-
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
|
|
2260
|
-
else:
|
|
2261
|
-
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
|
|
2262
|
-
@property
|
|
2263
|
-
def PairDeviceID(self):
|
|
2264
|
-
return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
|
|
2265
|
-
@PairDeviceID.setter
|
|
2266
|
-
def PairDeviceID(self, value):
|
|
2267
|
-
if isinstance(value, go.GoClass):
|
|
2268
|
-
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
|
|
2269
|
-
else:
|
|
2270
|
-
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
|
|
2271
|
-
@property
|
|
2272
|
-
def Connect(self):
|
|
2273
|
-
return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
|
|
2274
|
-
@Connect.setter
|
|
2275
|
-
def Connect(self, value):
|
|
2276
|
-
if isinstance(value, go.GoClass):
|
|
2277
|
-
_whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
|
|
2278
|
-
else:
|
|
2279
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2280
|
-
@property
|
|
2281
|
-
def Contact(self):
|
|
2282
|
-
return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
|
|
2283
|
-
@Contact.setter
|
|
2284
|
-
def Contact(self, value):
|
|
2285
|
-
if isinstance(value, go.GoClass):
|
|
2286
|
-
_whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
|
|
2287
|
-
else:
|
|
2288
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2289
|
-
@property
|
|
2290
|
-
def Presence(self):
|
|
2291
|
-
return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
|
|
2292
|
-
@Presence.setter
|
|
2293
|
-
def Presence(self, value):
|
|
2294
|
-
if isinstance(value, go.GoClass):
|
|
2295
|
-
_whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
|
|
2296
|
-
else:
|
|
2297
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2298
|
-
@property
|
|
2299
|
-
def Message(self):
|
|
2300
|
-
return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
|
|
2301
|
-
@Message.setter
|
|
2302
|
-
def Message(self, value):
|
|
2303
|
-
if isinstance(value, go.GoClass):
|
|
2304
|
-
_whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
|
|
2305
|
-
else:
|
|
2306
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2307
|
-
@property
|
|
2308
|
-
def ChatState(self):
|
|
2309
|
-
return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
|
|
2310
|
-
@ChatState.setter
|
|
2311
|
-
def ChatState(self, value):
|
|
2507
|
+
def MIME(self):
|
|
2508
|
+
return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
|
|
2509
|
+
@MIME.setter
|
|
2510
|
+
def MIME(self, value):
|
|
2312
2511
|
if isinstance(value, go.GoClass):
|
|
2313
|
-
_whatsapp.
|
|
2512
|
+
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
|
|
2314
2513
|
else:
|
|
2315
|
-
|
|
2514
|
+
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
|
|
2316
2515
|
@property
|
|
2317
|
-
def
|
|
2318
|
-
return
|
|
2319
|
-
@
|
|
2320
|
-
def
|
|
2516
|
+
def Filename(self):
|
|
2517
|
+
return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
|
|
2518
|
+
@Filename.setter
|
|
2519
|
+
def Filename(self, value):
|
|
2321
2520
|
if isinstance(value, go.GoClass):
|
|
2322
|
-
_whatsapp.
|
|
2521
|
+
_whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
|
|
2323
2522
|
else:
|
|
2324
|
-
|
|
2523
|
+
_whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
|
|
2325
2524
|
@property
|
|
2326
|
-
def
|
|
2327
|
-
return
|
|
2328
|
-
@
|
|
2329
|
-
def
|
|
2525
|
+
def Caption(self):
|
|
2526
|
+
return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
|
|
2527
|
+
@Caption.setter
|
|
2528
|
+
def Caption(self, value):
|
|
2330
2529
|
if isinstance(value, go.GoClass):
|
|
2331
|
-
_whatsapp.
|
|
2530
|
+
_whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
|
|
2332
2531
|
else:
|
|
2333
|
-
|
|
2532
|
+
_whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
|
|
2334
2533
|
@property
|
|
2335
|
-
def
|
|
2336
|
-
return
|
|
2337
|
-
@
|
|
2338
|
-
def
|
|
2534
|
+
def Data(self):
|
|
2535
|
+
return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
|
|
2536
|
+
@Data.setter
|
|
2537
|
+
def Data(self, value):
|
|
2339
2538
|
if isinstance(value, go.GoClass):
|
|
2340
|
-
_whatsapp.
|
|
2539
|
+
_whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
|
|
2341
2540
|
else:
|
|
2342
2541
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2542
|
+
def GetSpec(self, ctx):
|
|
2543
|
+
"""GetSpec(object ctx) object, str
|
|
2544
|
+
|
|
2545
|
+
GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
|
|
2546
|
+
"""
|
|
2547
|
+
return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
|
|
2343
2548
|
|
|
2344
|
-
# Python type for struct whatsapp.
|
|
2345
|
-
class
|
|
2346
|
-
"""
|
|
2549
|
+
# Python type for struct whatsapp.Presence
|
|
2550
|
+
class Presence(go.GoClass):
|
|
2551
|
+
"""Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
|
|
2347
2552
|
def __init__(self, *args, **kwargs):
|
|
2348
2553
|
"""
|
|
2349
2554
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2357,21 +2562,25 @@ class Contact(go.GoClass):
|
|
|
2357
2562
|
self.handle = args[0].handle
|
|
2358
2563
|
_whatsapp.IncRef(self.handle)
|
|
2359
2564
|
else:
|
|
2360
|
-
self.handle = _whatsapp.
|
|
2565
|
+
self.handle = _whatsapp.whatsapp_Presence_CTor()
|
|
2361
2566
|
_whatsapp.IncRef(self.handle)
|
|
2362
2567
|
if 0 < len(args):
|
|
2363
2568
|
self.JID = args[0]
|
|
2364
2569
|
if "JID" in kwargs:
|
|
2365
2570
|
self.JID = kwargs["JID"]
|
|
2366
2571
|
if 1 < len(args):
|
|
2367
|
-
self.
|
|
2368
|
-
if "
|
|
2369
|
-
self.
|
|
2572
|
+
self.Kind = args[1]
|
|
2573
|
+
if "Kind" in kwargs:
|
|
2574
|
+
self.Kind = kwargs["Kind"]
|
|
2575
|
+
if 2 < len(args):
|
|
2576
|
+
self.LastSeen = args[2]
|
|
2577
|
+
if "LastSeen" in kwargs:
|
|
2578
|
+
self.LastSeen = kwargs["LastSeen"]
|
|
2370
2579
|
def __del__(self):
|
|
2371
2580
|
_whatsapp.DecRef(self.handle)
|
|
2372
2581
|
def __str__(self):
|
|
2373
2582
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2374
|
-
sv = 'whatsapp.
|
|
2583
|
+
sv = 'whatsapp.Presence{'
|
|
2375
2584
|
first = True
|
|
2376
2585
|
for v in pr:
|
|
2377
2586
|
if callable(v[1]):
|
|
@@ -2384,129 +2593,82 @@ class Contact(go.GoClass):
|
|
|
2384
2593
|
return sv + '}'
|
|
2385
2594
|
def __repr__(self):
|
|
2386
2595
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2387
|
-
sv = 'whatsapp.
|
|
2596
|
+
sv = 'whatsapp.Presence ( '
|
|
2388
2597
|
for v in pr:
|
|
2389
2598
|
if not callable(v[1]):
|
|
2390
2599
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2391
2600
|
return sv + ')'
|
|
2392
2601
|
@property
|
|
2393
2602
|
def JID(self):
|
|
2394
|
-
return _whatsapp.
|
|
2603
|
+
return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
|
|
2395
2604
|
@JID.setter
|
|
2396
2605
|
def JID(self, value):
|
|
2397
2606
|
if isinstance(value, go.GoClass):
|
|
2398
|
-
_whatsapp.
|
|
2607
|
+
_whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
|
|
2399
2608
|
else:
|
|
2400
|
-
_whatsapp.
|
|
2609
|
+
_whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
|
|
2401
2610
|
@property
|
|
2402
|
-
def
|
|
2403
|
-
return _whatsapp.
|
|
2404
|
-
@
|
|
2405
|
-
def
|
|
2611
|
+
def Kind(self):
|
|
2612
|
+
return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
|
|
2613
|
+
@Kind.setter
|
|
2614
|
+
def Kind(self, value):
|
|
2406
2615
|
if isinstance(value, go.GoClass):
|
|
2407
|
-
_whatsapp.
|
|
2408
|
-
else:
|
|
2409
|
-
_whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
|
|
2410
|
-
|
|
2411
|
-
# Python type for struct whatsapp.Message
|
|
2412
|
-
class Message(go.GoClass):
|
|
2413
|
-
"""A Message represents one of many kinds of bidirectional communication payloads, for example, a\ntext message, a file (image, video) attachment, an emoji reaction, etc. Messages of different\nkinds are denoted as such, and re-use fields where the semantics overlap.\n"""
|
|
2414
|
-
def __init__(self, *args, **kwargs):
|
|
2415
|
-
"""
|
|
2416
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2417
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
|
2418
|
-
in which case a new Go object is constructed first
|
|
2419
|
-
"""
|
|
2420
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2421
|
-
self.handle = kwargs['handle']
|
|
2422
|
-
_whatsapp.IncRef(self.handle)
|
|
2423
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
2424
|
-
self.handle = args[0].handle
|
|
2425
|
-
_whatsapp.IncRef(self.handle)
|
|
2616
|
+
_whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
|
|
2426
2617
|
else:
|
|
2427
|
-
self.handle
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
self.Attachments = kwargs["Attachments"]
|
|
2477
|
-
if 12 < len(args):
|
|
2478
|
-
self.Preview = args[12]
|
|
2479
|
-
if "Preview" in kwargs:
|
|
2480
|
-
self.Preview = kwargs["Preview"]
|
|
2481
|
-
if 13 < len(args):
|
|
2482
|
-
self.Location = args[13]
|
|
2483
|
-
if "Location" in kwargs:
|
|
2484
|
-
self.Location = kwargs["Location"]
|
|
2485
|
-
if 14 < len(args):
|
|
2486
|
-
self.Poll = args[14]
|
|
2487
|
-
if "Poll" in kwargs:
|
|
2488
|
-
self.Poll = kwargs["Poll"]
|
|
2489
|
-
if 15 < len(args):
|
|
2490
|
-
self.Album = args[15]
|
|
2491
|
-
if "Album" in kwargs:
|
|
2492
|
-
self.Album = kwargs["Album"]
|
|
2493
|
-
if 16 < len(args):
|
|
2494
|
-
self.MentionJIDs = args[16]
|
|
2495
|
-
if "MentionJIDs" in kwargs:
|
|
2496
|
-
self.MentionJIDs = kwargs["MentionJIDs"]
|
|
2497
|
-
if 17 < len(args):
|
|
2498
|
-
self.Receipts = args[17]
|
|
2499
|
-
if "Receipts" in kwargs:
|
|
2500
|
-
self.Receipts = kwargs["Receipts"]
|
|
2501
|
-
if 18 < len(args):
|
|
2502
|
-
self.Reactions = args[18]
|
|
2503
|
-
if "Reactions" in kwargs:
|
|
2504
|
-
self.Reactions = kwargs["Reactions"]
|
|
2618
|
+
_whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
|
|
2619
|
+
@property
|
|
2620
|
+
def LastSeen(self):
|
|
2621
|
+
return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
|
|
2622
|
+
@LastSeen.setter
|
|
2623
|
+
def LastSeen(self, value):
|
|
2624
|
+
if isinstance(value, go.GoClass):
|
|
2625
|
+
_whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
|
|
2626
|
+
else:
|
|
2627
|
+
_whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
|
|
2628
|
+
|
|
2629
|
+
# Python type for struct whatsapp.Preview
|
|
2630
|
+
class Preview(go.GoClass):
|
|
2631
|
+
"""A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
|
|
2632
|
+
def __init__(self, *args, **kwargs):
|
|
2633
|
+
"""
|
|
2634
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2635
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
|
2636
|
+
in which case a new Go object is constructed first
|
|
2637
|
+
"""
|
|
2638
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2639
|
+
self.handle = kwargs['handle']
|
|
2640
|
+
_whatsapp.IncRef(self.handle)
|
|
2641
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
2642
|
+
self.handle = args[0].handle
|
|
2643
|
+
_whatsapp.IncRef(self.handle)
|
|
2644
|
+
else:
|
|
2645
|
+
self.handle = _whatsapp.whatsapp_Preview_CTor()
|
|
2646
|
+
_whatsapp.IncRef(self.handle)
|
|
2647
|
+
if 0 < len(args):
|
|
2648
|
+
self.Kind = args[0]
|
|
2649
|
+
if "Kind" in kwargs:
|
|
2650
|
+
self.Kind = kwargs["Kind"]
|
|
2651
|
+
if 1 < len(args):
|
|
2652
|
+
self.URL = args[1]
|
|
2653
|
+
if "URL" in kwargs:
|
|
2654
|
+
self.URL = kwargs["URL"]
|
|
2655
|
+
if 2 < len(args):
|
|
2656
|
+
self.Title = args[2]
|
|
2657
|
+
if "Title" in kwargs:
|
|
2658
|
+
self.Title = kwargs["Title"]
|
|
2659
|
+
if 3 < len(args):
|
|
2660
|
+
self.Description = args[3]
|
|
2661
|
+
if "Description" in kwargs:
|
|
2662
|
+
self.Description = kwargs["Description"]
|
|
2663
|
+
if 4 < len(args):
|
|
2664
|
+
self.Thumbnail = args[4]
|
|
2665
|
+
if "Thumbnail" in kwargs:
|
|
2666
|
+
self.Thumbnail = kwargs["Thumbnail"]
|
|
2505
2667
|
def __del__(self):
|
|
2506
2668
|
_whatsapp.DecRef(self.handle)
|
|
2507
2669
|
def __str__(self):
|
|
2508
2670
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2509
|
-
sv = 'whatsapp.
|
|
2671
|
+
sv = 'whatsapp.Preview{'
|
|
2510
2672
|
first = True
|
|
2511
2673
|
for v in pr:
|
|
2512
2674
|
if callable(v[1]):
|
|
@@ -2519,186 +2681,60 @@ class Message(go.GoClass):
|
|
|
2519
2681
|
return sv + '}'
|
|
2520
2682
|
def __repr__(self):
|
|
2521
2683
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2522
|
-
sv = 'whatsapp.
|
|
2684
|
+
sv = 'whatsapp.Preview ( '
|
|
2523
2685
|
for v in pr:
|
|
2524
2686
|
if not callable(v[1]):
|
|
2525
2687
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2526
2688
|
return sv + ')'
|
|
2527
2689
|
@property
|
|
2528
2690
|
def Kind(self):
|
|
2529
|
-
return _whatsapp.
|
|
2691
|
+
return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
|
|
2530
2692
|
@Kind.setter
|
|
2531
2693
|
def Kind(self, value):
|
|
2532
2694
|
if isinstance(value, go.GoClass):
|
|
2533
|
-
_whatsapp.
|
|
2534
|
-
else:
|
|
2535
|
-
_whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
|
|
2536
|
-
@property
|
|
2537
|
-
def ID(self):
|
|
2538
|
-
return _whatsapp.whatsapp_Message_ID_Get(self.handle)
|
|
2539
|
-
@ID.setter
|
|
2540
|
-
def ID(self, value):
|
|
2541
|
-
if isinstance(value, go.GoClass):
|
|
2542
|
-
_whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
|
|
2543
|
-
else:
|
|
2544
|
-
_whatsapp.whatsapp_Message_ID_Set(self.handle, value)
|
|
2545
|
-
@property
|
|
2546
|
-
def JID(self):
|
|
2547
|
-
return _whatsapp.whatsapp_Message_JID_Get(self.handle)
|
|
2548
|
-
@JID.setter
|
|
2549
|
-
def JID(self, value):
|
|
2550
|
-
if isinstance(value, go.GoClass):
|
|
2551
|
-
_whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
|
|
2552
|
-
else:
|
|
2553
|
-
_whatsapp.whatsapp_Message_JID_Set(self.handle, value)
|
|
2554
|
-
@property
|
|
2555
|
-
def GroupJID(self):
|
|
2556
|
-
return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
|
|
2557
|
-
@GroupJID.setter
|
|
2558
|
-
def GroupJID(self, value):
|
|
2559
|
-
if isinstance(value, go.GoClass):
|
|
2560
|
-
_whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
|
|
2561
|
-
else:
|
|
2562
|
-
_whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
|
|
2563
|
-
@property
|
|
2564
|
-
def OriginJID(self):
|
|
2565
|
-
return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
|
|
2566
|
-
@OriginJID.setter
|
|
2567
|
-
def OriginJID(self, value):
|
|
2568
|
-
if isinstance(value, go.GoClass):
|
|
2569
|
-
_whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
|
|
2570
|
-
else:
|
|
2571
|
-
_whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
|
|
2572
|
-
@property
|
|
2573
|
-
def Body(self):
|
|
2574
|
-
return _whatsapp.whatsapp_Message_Body_Get(self.handle)
|
|
2575
|
-
@Body.setter
|
|
2576
|
-
def Body(self, value):
|
|
2577
|
-
if isinstance(value, go.GoClass):
|
|
2578
|
-
_whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
|
|
2579
|
-
else:
|
|
2580
|
-
_whatsapp.whatsapp_Message_Body_Set(self.handle, value)
|
|
2581
|
-
@property
|
|
2582
|
-
def Timestamp(self):
|
|
2583
|
-
return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
|
|
2584
|
-
@Timestamp.setter
|
|
2585
|
-
def Timestamp(self, value):
|
|
2586
|
-
if isinstance(value, go.GoClass):
|
|
2587
|
-
_whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
|
|
2588
|
-
else:
|
|
2589
|
-
_whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
|
|
2590
|
-
@property
|
|
2591
|
-
def IsCarbon(self):
|
|
2592
|
-
return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
|
|
2593
|
-
@IsCarbon.setter
|
|
2594
|
-
def IsCarbon(self, value):
|
|
2595
|
-
if isinstance(value, go.GoClass):
|
|
2596
|
-
_whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
|
|
2597
|
-
else:
|
|
2598
|
-
_whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
|
|
2599
|
-
@property
|
|
2600
|
-
def IsForwarded(self):
|
|
2601
|
-
return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
|
|
2602
|
-
@IsForwarded.setter
|
|
2603
|
-
def IsForwarded(self, value):
|
|
2604
|
-
if isinstance(value, go.GoClass):
|
|
2605
|
-
_whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
|
|
2606
|
-
else:
|
|
2607
|
-
_whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
|
|
2608
|
-
@property
|
|
2609
|
-
def ReplyID(self):
|
|
2610
|
-
return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
|
|
2611
|
-
@ReplyID.setter
|
|
2612
|
-
def ReplyID(self, value):
|
|
2613
|
-
if isinstance(value, go.GoClass):
|
|
2614
|
-
_whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
|
|
2615
|
-
else:
|
|
2616
|
-
_whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
|
|
2617
|
-
@property
|
|
2618
|
-
def ReplyBody(self):
|
|
2619
|
-
return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
|
|
2620
|
-
@ReplyBody.setter
|
|
2621
|
-
def ReplyBody(self, value):
|
|
2622
|
-
if isinstance(value, go.GoClass):
|
|
2623
|
-
_whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
|
|
2624
|
-
else:
|
|
2625
|
-
_whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
|
|
2626
|
-
@property
|
|
2627
|
-
def Attachments(self):
|
|
2628
|
-
return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
|
|
2629
|
-
@Attachments.setter
|
|
2630
|
-
def Attachments(self, value):
|
|
2631
|
-
if isinstance(value, go.GoClass):
|
|
2632
|
-
_whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
|
|
2633
|
-
else:
|
|
2634
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2635
|
-
@property
|
|
2636
|
-
def Preview(self):
|
|
2637
|
-
return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
|
|
2638
|
-
@Preview.setter
|
|
2639
|
-
def Preview(self, value):
|
|
2640
|
-
if isinstance(value, go.GoClass):
|
|
2641
|
-
_whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
|
|
2642
|
-
else:
|
|
2643
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2644
|
-
@property
|
|
2645
|
-
def Location(self):
|
|
2646
|
-
return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
|
|
2647
|
-
@Location.setter
|
|
2648
|
-
def Location(self, value):
|
|
2649
|
-
if isinstance(value, go.GoClass):
|
|
2650
|
-
_whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
|
|
2651
|
-
else:
|
|
2652
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2653
|
-
@property
|
|
2654
|
-
def Poll(self):
|
|
2655
|
-
return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
|
|
2656
|
-
@Poll.setter
|
|
2657
|
-
def Poll(self, value):
|
|
2658
|
-
if isinstance(value, go.GoClass):
|
|
2659
|
-
_whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
|
|
2695
|
+
_whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
|
|
2660
2696
|
else:
|
|
2661
|
-
|
|
2697
|
+
_whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
|
|
2662
2698
|
@property
|
|
2663
|
-
def
|
|
2664
|
-
return
|
|
2665
|
-
@
|
|
2666
|
-
def
|
|
2699
|
+
def URL(self):
|
|
2700
|
+
return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
|
|
2701
|
+
@URL.setter
|
|
2702
|
+
def URL(self, value):
|
|
2667
2703
|
if isinstance(value, go.GoClass):
|
|
2668
|
-
_whatsapp.
|
|
2704
|
+
_whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
|
|
2669
2705
|
else:
|
|
2670
|
-
|
|
2706
|
+
_whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
|
|
2671
2707
|
@property
|
|
2672
|
-
def
|
|
2673
|
-
return
|
|
2674
|
-
@
|
|
2675
|
-
def
|
|
2708
|
+
def Title(self):
|
|
2709
|
+
return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
|
|
2710
|
+
@Title.setter
|
|
2711
|
+
def Title(self, value):
|
|
2676
2712
|
if isinstance(value, go.GoClass):
|
|
2677
|
-
_whatsapp.
|
|
2713
|
+
_whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
|
|
2678
2714
|
else:
|
|
2679
|
-
|
|
2715
|
+
_whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
|
|
2680
2716
|
@property
|
|
2681
|
-
def
|
|
2682
|
-
return
|
|
2683
|
-
@
|
|
2684
|
-
def
|
|
2717
|
+
def Description(self):
|
|
2718
|
+
return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
|
|
2719
|
+
@Description.setter
|
|
2720
|
+
def Description(self, value):
|
|
2685
2721
|
if isinstance(value, go.GoClass):
|
|
2686
|
-
_whatsapp.
|
|
2722
|
+
_whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
|
|
2687
2723
|
else:
|
|
2688
|
-
|
|
2724
|
+
_whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
|
|
2689
2725
|
@property
|
|
2690
|
-
def
|
|
2691
|
-
return
|
|
2692
|
-
@
|
|
2693
|
-
def
|
|
2726
|
+
def Thumbnail(self):
|
|
2727
|
+
return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
|
|
2728
|
+
@Thumbnail.setter
|
|
2729
|
+
def Thumbnail(self, value):
|
|
2694
2730
|
if isinstance(value, go.GoClass):
|
|
2695
|
-
_whatsapp.
|
|
2731
|
+
_whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
|
|
2696
2732
|
else:
|
|
2697
2733
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2698
2734
|
|
|
2699
|
-
# Python type for struct whatsapp.
|
|
2700
|
-
class
|
|
2701
|
-
"""A
|
|
2735
|
+
# Python type for struct whatsapp.LinkedDevice
|
|
2736
|
+
class LinkedDevice(go.GoClass):
|
|
2737
|
+
"""A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
|
|
2702
2738
|
def __init__(self, *args, **kwargs):
|
|
2703
2739
|
"""
|
|
2704
2740
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2712,17 +2748,17 @@ class PollOption(go.GoClass):
|
|
|
2712
2748
|
self.handle = args[0].handle
|
|
2713
2749
|
_whatsapp.IncRef(self.handle)
|
|
2714
2750
|
else:
|
|
2715
|
-
self.handle = _whatsapp.
|
|
2751
|
+
self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
|
|
2716
2752
|
_whatsapp.IncRef(self.handle)
|
|
2717
2753
|
if 0 < len(args):
|
|
2718
|
-
self.
|
|
2719
|
-
if "
|
|
2720
|
-
self.
|
|
2754
|
+
self.ID = args[0]
|
|
2755
|
+
if "ID" in kwargs:
|
|
2756
|
+
self.ID = kwargs["ID"]
|
|
2721
2757
|
def __del__(self):
|
|
2722
2758
|
_whatsapp.DecRef(self.handle)
|
|
2723
2759
|
def __str__(self):
|
|
2724
2760
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2725
|
-
sv = 'whatsapp.
|
|
2761
|
+
sv = 'whatsapp.LinkedDevice{'
|
|
2726
2762
|
first = True
|
|
2727
2763
|
for v in pr:
|
|
2728
2764
|
if callable(v[1]):
|
|
@@ -2735,24 +2771,34 @@ class PollOption(go.GoClass):
|
|
|
2735
2771
|
return sv + '}'
|
|
2736
2772
|
def __repr__(self):
|
|
2737
2773
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2738
|
-
sv = 'whatsapp.
|
|
2774
|
+
sv = 'whatsapp.LinkedDevice ( '
|
|
2739
2775
|
for v in pr:
|
|
2740
2776
|
if not callable(v[1]):
|
|
2741
2777
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2742
2778
|
return sv + ')'
|
|
2743
2779
|
@property
|
|
2744
|
-
def
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2780
|
+
def ID(self):
|
|
2781
|
+
"""ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
|
|
2782
|
+
is currently equivalent to a password, and needs to be protected accordingly.
|
|
2783
|
+
"""
|
|
2784
|
+
return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
|
|
2785
|
+
@ID.setter
|
|
2786
|
+
def ID(self, value):
|
|
2748
2787
|
if isinstance(value, go.GoClass):
|
|
2749
|
-
_whatsapp.
|
|
2788
|
+
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
|
|
2750
2789
|
else:
|
|
2751
|
-
_whatsapp.
|
|
2790
|
+
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
|
|
2791
|
+
def JID(self):
|
|
2792
|
+
"""JID() object
|
|
2793
|
+
|
|
2794
|
+
JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
|
|
2795
|
+
may return invalid JIDs, and this function does not handle errors.
|
|
2796
|
+
"""
|
|
2797
|
+
return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
|
|
2752
2798
|
|
|
2753
|
-
# Python type for struct whatsapp.
|
|
2754
|
-
class
|
|
2755
|
-
"""A
|
|
2799
|
+
# Python type for struct whatsapp.ChatState
|
|
2800
|
+
class ChatState(go.GoClass):
|
|
2801
|
+
"""A ChatState represents the activity of a contact within a certain discussion, for instance,\nwhether the contact is currently composing a message. This is separate to the concept of a\nPresence, which is the contact's general state across all discussions.\n"""
|
|
2756
2802
|
def __init__(self, *args, **kwargs):
|
|
2757
2803
|
"""
|
|
2758
2804
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2766,37 +2812,25 @@ class Receipt(go.GoClass):
|
|
|
2766
2812
|
self.handle = args[0].handle
|
|
2767
2813
|
_whatsapp.IncRef(self.handle)
|
|
2768
2814
|
else:
|
|
2769
|
-
self.handle = _whatsapp.
|
|
2815
|
+
self.handle = _whatsapp.whatsapp_ChatState_CTor()
|
|
2770
2816
|
_whatsapp.IncRef(self.handle)
|
|
2771
2817
|
if 0 < len(args):
|
|
2772
2818
|
self.Kind = args[0]
|
|
2773
2819
|
if "Kind" in kwargs:
|
|
2774
2820
|
self.Kind = kwargs["Kind"]
|
|
2775
2821
|
if 1 < len(args):
|
|
2776
|
-
self.
|
|
2777
|
-
if "MessageIDs" in kwargs:
|
|
2778
|
-
self.MessageIDs = kwargs["MessageIDs"]
|
|
2779
|
-
if 2 < len(args):
|
|
2780
|
-
self.JID = args[2]
|
|
2822
|
+
self.JID = args[1]
|
|
2781
2823
|
if "JID" in kwargs:
|
|
2782
2824
|
self.JID = kwargs["JID"]
|
|
2783
|
-
if
|
|
2784
|
-
self.GroupJID = args[
|
|
2825
|
+
if 2 < len(args):
|
|
2826
|
+
self.GroupJID = args[2]
|
|
2785
2827
|
if "GroupJID" in kwargs:
|
|
2786
2828
|
self.GroupJID = kwargs["GroupJID"]
|
|
2787
|
-
if 4 < len(args):
|
|
2788
|
-
self.Timestamp = args[4]
|
|
2789
|
-
if "Timestamp" in kwargs:
|
|
2790
|
-
self.Timestamp = kwargs["Timestamp"]
|
|
2791
|
-
if 5 < len(args):
|
|
2792
|
-
self.IsCarbon = args[5]
|
|
2793
|
-
if "IsCarbon" in kwargs:
|
|
2794
|
-
self.IsCarbon = kwargs["IsCarbon"]
|
|
2795
2829
|
def __del__(self):
|
|
2796
2830
|
_whatsapp.DecRef(self.handle)
|
|
2797
2831
|
def __str__(self):
|
|
2798
2832
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2799
|
-
sv = 'whatsapp.
|
|
2833
|
+
sv = 'whatsapp.ChatState{'
|
|
2800
2834
|
first = True
|
|
2801
2835
|
for v in pr:
|
|
2802
2836
|
if callable(v[1]):
|
|
@@ -2809,69 +2843,42 @@ class Receipt(go.GoClass):
|
|
|
2809
2843
|
return sv + '}'
|
|
2810
2844
|
def __repr__(self):
|
|
2811
2845
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2812
|
-
sv = 'whatsapp.
|
|
2846
|
+
sv = 'whatsapp.ChatState ( '
|
|
2813
2847
|
for v in pr:
|
|
2814
2848
|
if not callable(v[1]):
|
|
2815
2849
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2816
2850
|
return sv + ')'
|
|
2817
2851
|
@property
|
|
2818
2852
|
def Kind(self):
|
|
2819
|
-
return _whatsapp.
|
|
2853
|
+
return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
|
|
2820
2854
|
@Kind.setter
|
|
2821
2855
|
def Kind(self, value):
|
|
2822
2856
|
if isinstance(value, go.GoClass):
|
|
2823
|
-
_whatsapp.
|
|
2824
|
-
else:
|
|
2825
|
-
_whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
|
|
2826
|
-
@property
|
|
2827
|
-
def MessageIDs(self):
|
|
2828
|
-
return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
|
|
2829
|
-
@MessageIDs.setter
|
|
2830
|
-
def MessageIDs(self, value):
|
|
2831
|
-
if isinstance(value, go.GoClass):
|
|
2832
|
-
_whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
|
|
2857
|
+
_whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
|
|
2833
2858
|
else:
|
|
2834
|
-
|
|
2859
|
+
_whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
|
|
2835
2860
|
@property
|
|
2836
2861
|
def JID(self):
|
|
2837
|
-
return _whatsapp.
|
|
2862
|
+
return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
|
|
2838
2863
|
@JID.setter
|
|
2839
2864
|
def JID(self, value):
|
|
2840
2865
|
if isinstance(value, go.GoClass):
|
|
2841
|
-
_whatsapp.
|
|
2866
|
+
_whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
|
|
2842
2867
|
else:
|
|
2843
|
-
_whatsapp.
|
|
2868
|
+
_whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
|
|
2844
2869
|
@property
|
|
2845
2870
|
def GroupJID(self):
|
|
2846
|
-
return _whatsapp.
|
|
2871
|
+
return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
|
|
2847
2872
|
@GroupJID.setter
|
|
2848
2873
|
def GroupJID(self, value):
|
|
2849
2874
|
if isinstance(value, go.GoClass):
|
|
2850
|
-
_whatsapp.
|
|
2851
|
-
else:
|
|
2852
|
-
_whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
|
|
2853
|
-
@property
|
|
2854
|
-
def Timestamp(self):
|
|
2855
|
-
return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
|
|
2856
|
-
@Timestamp.setter
|
|
2857
|
-
def Timestamp(self, value):
|
|
2858
|
-
if isinstance(value, go.GoClass):
|
|
2859
|
-
_whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
|
|
2860
|
-
else:
|
|
2861
|
-
_whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
|
|
2862
|
-
@property
|
|
2863
|
-
def IsCarbon(self):
|
|
2864
|
-
return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
|
|
2865
|
-
@IsCarbon.setter
|
|
2866
|
-
def IsCarbon(self, value):
|
|
2867
|
-
if isinstance(value, go.GoClass):
|
|
2868
|
-
_whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
|
|
2875
|
+
_whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
|
|
2869
2876
|
else:
|
|
2870
|
-
_whatsapp.
|
|
2877
|
+
_whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
|
|
2871
2878
|
|
|
2872
|
-
# Python type for struct whatsapp.
|
|
2873
|
-
class
|
|
2874
|
-
"""
|
|
2879
|
+
# Python type for struct whatsapp.Connect
|
|
2880
|
+
class Connect(go.GoClass):
|
|
2881
|
+
"""Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
|
|
2875
2882
|
def __init__(self, *args, **kwargs):
|
|
2876
2883
|
"""
|
|
2877
2884
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2885,13 +2892,21 @@ class Session(go.GoClass):
|
|
|
2885
2892
|
self.handle = args[0].handle
|
|
2886
2893
|
_whatsapp.IncRef(self.handle)
|
|
2887
2894
|
else:
|
|
2888
|
-
self.handle = _whatsapp.
|
|
2895
|
+
self.handle = _whatsapp.whatsapp_Connect_CTor()
|
|
2889
2896
|
_whatsapp.IncRef(self.handle)
|
|
2897
|
+
if 0 < len(args):
|
|
2898
|
+
self.JID = args[0]
|
|
2899
|
+
if "JID" in kwargs:
|
|
2900
|
+
self.JID = kwargs["JID"]
|
|
2901
|
+
if 1 < len(args):
|
|
2902
|
+
self.Error = args[1]
|
|
2903
|
+
if "Error" in kwargs:
|
|
2904
|
+
self.Error = kwargs["Error"]
|
|
2890
2905
|
def __del__(self):
|
|
2891
2906
|
_whatsapp.DecRef(self.handle)
|
|
2892
2907
|
def __str__(self):
|
|
2893
2908
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2894
|
-
sv = 'whatsapp.
|
|
2909
|
+
sv = 'whatsapp.Connect{'
|
|
2895
2910
|
first = True
|
|
2896
2911
|
for v in pr:
|
|
2897
2912
|
if callable(v[1]):
|
|
@@ -2902,169 +2917,102 @@ class Session(go.GoClass):
|
|
|
2902
2917
|
sv += ', '
|
|
2903
2918
|
sv += v[0] + '=' + str(v[1])
|
|
2904
2919
|
return sv + '}'
|
|
2905
|
-
def __repr__(self):
|
|
2906
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2907
|
-
sv = 'whatsapp.
|
|
2908
|
-
for v in pr:
|
|
2909
|
-
if not callable(v[1]):
|
|
2910
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2911
|
-
return sv + ')'
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
|
|
2936
|
-
user's primary device, as identified by the given phone number. This will return an error if the
|
|
2937
|
-
[Session] is already paired, or if the phone number given is empty or invalid.
|
|
2938
|
-
"""
|
|
2939
|
-
return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
|
|
2940
|
-
def SendMessage(self, message):
|
|
2941
|
-
"""SendMessage(object message) str
|
|
2942
|
-
|
|
2943
|
-
SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
|
|
2944
|
-
specified within. In general, different message kinds require different fields to be set; see the
|
|
2945
|
-
documentation for the [Message] type for more information.
|
|
2946
|
-
"""
|
|
2947
|
-
return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
|
|
2948
|
-
def GenerateMessageID(self):
|
|
2949
|
-
"""GenerateMessageID() str
|
|
2950
|
-
|
|
2951
|
-
GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
|
|
2952
|
-
"""
|
|
2953
|
-
return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
|
|
2954
|
-
def SendChatState(self, state):
|
|
2955
|
-
"""SendChatState(object state) str
|
|
2956
|
-
|
|
2957
|
-
SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
|
|
2958
|
-
contact specified within.
|
|
2959
|
-
"""
|
|
2960
|
-
return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
|
|
2961
|
-
def SendReceipt(self, receipt):
|
|
2962
|
-
"""SendReceipt(object receipt) str
|
|
2963
|
-
|
|
2964
|
-
SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
|
|
2965
|
-
"""
|
|
2966
|
-
return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
|
|
2967
|
-
def SendPresence(self, presence, statusMessage):
|
|
2968
|
-
"""SendPresence(int presence, str statusMessage) str
|
|
2969
|
-
|
|
2970
|
-
SendPresence sets the activity state and (optional) status message for the current session and
|
|
2971
|
-
user. An error is returned if setting availability fails for any reason.
|
|
2972
|
-
"""
|
|
2973
|
-
return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
|
|
2974
|
-
def GetContacts(self, refresh):
|
|
2975
|
-
"""GetContacts(bool refresh) []object, str
|
|
2976
|
-
|
|
2977
|
-
GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
|
|
2978
|
-
If `refresh` is `true`, FetchRoster will pull application state from the remote service and
|
|
2979
|
-
synchronize any contacts found with the adapter.
|
|
2980
|
-
"""
|
|
2981
|
-
return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
|
|
2982
|
-
def GetGroups(self):
|
|
2983
|
-
"""GetGroups() []object, str
|
|
2984
|
-
|
|
2985
|
-
GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
|
|
2986
|
-
information on present participants.
|
|
2987
|
-
"""
|
|
2988
|
-
return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
|
|
2989
|
-
def CreateGroup(self, name, participants):
|
|
2990
|
-
"""CreateGroup(str name, []str participants) object, str
|
|
2991
|
-
|
|
2992
|
-
CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
|
|
2993
|
-
participant JIDs given.
|
|
2994
|
-
"""
|
|
2995
|
-
return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
|
|
2996
|
-
def LeaveGroup(self, resourceID):
|
|
2997
|
-
"""LeaveGroup(str resourceID) str
|
|
2998
|
-
|
|
2999
|
-
LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
|
|
3000
|
-
"""
|
|
3001
|
-
return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
|
|
3002
|
-
def GetAvatar(self, resourceID, avatarID):
|
|
3003
|
-
"""GetAvatar(str resourceID, str avatarID) object, str
|
|
3004
|
-
|
|
3005
|
-
GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
|
|
3006
|
-
is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
|
|
3007
|
-
for the given ID has not changed.
|
|
3008
|
-
"""
|
|
3009
|
-
return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
|
|
3010
|
-
def SetAvatar(self, resourceID, avatar):
|
|
3011
|
-
"""SetAvatar(str resourceID, []int avatar) str, str
|
|
3012
|
-
|
|
3013
|
-
SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
|
|
3014
|
-
profile picture for our own user by providing an empty JID. The unique picture ID is returned,
|
|
3015
|
-
typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
|
|
3016
|
-
"""
|
|
3017
|
-
return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
|
|
3018
|
-
def SetGroupName(self, resourceID, name):
|
|
3019
|
-
"""SetGroupName(str resourceID, str name) str
|
|
3020
|
-
|
|
3021
|
-
SetGroupName updates the name of a WhatsApp group for the Group JID given.
|
|
3022
|
-
"""
|
|
3023
|
-
return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
|
|
3024
|
-
def SetGroupTopic(self, resourceID, topic):
|
|
3025
|
-
"""SetGroupTopic(str resourceID, str topic) str
|
|
3026
|
-
|
|
3027
|
-
SetGroupName updates the topic of a WhatsApp group for the Group JID given.
|
|
3028
|
-
"""
|
|
3029
|
-
return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
|
|
3030
|
-
def UpdateGroupParticipants(self, resourceID, participants):
|
|
3031
|
-
"""UpdateGroupParticipants(str resourceID, []object participants) []object, str
|
|
3032
|
-
|
|
3033
|
-
UpdateGroupParticipants processes changes to the given group's participants, including additions,
|
|
3034
|
-
removals, and changes to privileges. Participant JIDs given must be part of the authenticated
|
|
3035
|
-
session's roster at least, and must also be active group participants for other types of changes.
|
|
3036
|
-
"""
|
|
3037
|
-
return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
|
|
3038
|
-
def FindContact(self, phone):
|
|
3039
|
-
"""FindContact(str phone) object, str
|
|
3040
|
-
|
|
3041
|
-
FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
|
|
3042
|
-
phone number, returning a concrete instance if found; typically, only the contact JID is set. No
|
|
3043
|
-
error is returned if no contact was found, but any unexpected errors will otherwise be returned
|
|
3044
|
-
directly.
|
|
3045
|
-
"""
|
|
3046
|
-
return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
|
|
3047
|
-
def RequestMessageHistory(self, resourceID, oldestMessage):
|
|
3048
|
-
"""RequestMessageHistory(str resourceID, object oldestMessage) str
|
|
3049
|
-
|
|
3050
|
-
RequestMessageHistory sends and asynchronous request for message history related to the given
|
|
3051
|
-
resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
|
|
3052
|
-
history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
|
|
3053
|
-
event handler. An error will be returned if requesting history fails for any reason.
|
|
2920
|
+
def __repr__(self):
|
|
2921
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2922
|
+
sv = 'whatsapp.Connect ( '
|
|
2923
|
+
for v in pr:
|
|
2924
|
+
if not callable(v[1]):
|
|
2925
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2926
|
+
return sv + ')'
|
|
2927
|
+
@property
|
|
2928
|
+
def JID(self):
|
|
2929
|
+
return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
|
|
2930
|
+
@JID.setter
|
|
2931
|
+
def JID(self, value):
|
|
2932
|
+
if isinstance(value, go.GoClass):
|
|
2933
|
+
_whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
|
|
2934
|
+
else:
|
|
2935
|
+
_whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
|
|
2936
|
+
@property
|
|
2937
|
+
def Error(self):
|
|
2938
|
+
return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
|
|
2939
|
+
@Error.setter
|
|
2940
|
+
def Error(self, value):
|
|
2941
|
+
if isinstance(value, go.GoClass):
|
|
2942
|
+
_whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
|
|
2943
|
+
else:
|
|
2944
|
+
_whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
|
|
2945
|
+
|
|
2946
|
+
# Python type for struct whatsapp.Poll
|
|
2947
|
+
class Poll(go.GoClass):
|
|
2948
|
+
"""A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
|
|
2949
|
+
def __init__(self, *args, **kwargs):
|
|
3054
2950
|
"""
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
SetEventHandler assigns the given handler function for propagating internal events into the Python
|
|
3060
|
-
gateway. Note that the event handler function is not entirely safe to use directly, and all calls
|
|
3061
|
-
should instead be sent to the [Gateway] via its internal call channel.
|
|
2951
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2952
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
|
2953
|
+
in which case a new Go object is constructed first
|
|
3062
2954
|
"""
|
|
3063
|
-
|
|
2955
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2956
|
+
self.handle = kwargs['handle']
|
|
2957
|
+
_whatsapp.IncRef(self.handle)
|
|
2958
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
2959
|
+
self.handle = args[0].handle
|
|
2960
|
+
_whatsapp.IncRef(self.handle)
|
|
2961
|
+
else:
|
|
2962
|
+
self.handle = _whatsapp.whatsapp_Poll_CTor()
|
|
2963
|
+
_whatsapp.IncRef(self.handle)
|
|
2964
|
+
if 0 < len(args):
|
|
2965
|
+
self.Title = args[0]
|
|
2966
|
+
if "Title" in kwargs:
|
|
2967
|
+
self.Title = kwargs["Title"]
|
|
2968
|
+
if 1 < len(args):
|
|
2969
|
+
self.Options = args[1]
|
|
2970
|
+
if "Options" in kwargs:
|
|
2971
|
+
self.Options = kwargs["Options"]
|
|
2972
|
+
def __del__(self):
|
|
2973
|
+
_whatsapp.DecRef(self.handle)
|
|
2974
|
+
def __str__(self):
|
|
2975
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2976
|
+
sv = 'whatsapp.Poll{'
|
|
2977
|
+
first = True
|
|
2978
|
+
for v in pr:
|
|
2979
|
+
if callable(v[1]):
|
|
2980
|
+
continue
|
|
2981
|
+
if first:
|
|
2982
|
+
first = False
|
|
2983
|
+
else:
|
|
2984
|
+
sv += ', '
|
|
2985
|
+
sv += v[0] + '=' + str(v[1])
|
|
2986
|
+
return sv + '}'
|
|
2987
|
+
def __repr__(self):
|
|
2988
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2989
|
+
sv = 'whatsapp.Poll ( '
|
|
2990
|
+
for v in pr:
|
|
2991
|
+
if not callable(v[1]):
|
|
2992
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2993
|
+
return sv + ')'
|
|
2994
|
+
@property
|
|
2995
|
+
def Title(self):
|
|
2996
|
+
return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
|
|
2997
|
+
@Title.setter
|
|
2998
|
+
def Title(self, value):
|
|
2999
|
+
if isinstance(value, go.GoClass):
|
|
3000
|
+
_whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
|
|
3001
|
+
else:
|
|
3002
|
+
_whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
|
|
3003
|
+
@property
|
|
3004
|
+
def Options(self):
|
|
3005
|
+
return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
|
|
3006
|
+
@Options.setter
|
|
3007
|
+
def Options(self, value):
|
|
3008
|
+
if isinstance(value, go.GoClass):
|
|
3009
|
+
_whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
|
|
3010
|
+
else:
|
|
3011
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
3064
3012
|
|
|
3065
|
-
# Python type for struct whatsapp.
|
|
3066
|
-
class
|
|
3067
|
-
"""A
|
|
3013
|
+
# Python type for struct whatsapp.Receipt
|
|
3014
|
+
class Receipt(go.GoClass):
|
|
3015
|
+
"""A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
|
|
3068
3016
|
def __init__(self, *args, **kwargs):
|
|
3069
3017
|
"""
|
|
3070
3018
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -3078,25 +3026,37 @@ class Album(go.GoClass):
|
|
|
3078
3026
|
self.handle = args[0].handle
|
|
3079
3027
|
_whatsapp.IncRef(self.handle)
|
|
3080
3028
|
else:
|
|
3081
|
-
self.handle = _whatsapp.
|
|
3029
|
+
self.handle = _whatsapp.whatsapp_Receipt_CTor()
|
|
3082
3030
|
_whatsapp.IncRef(self.handle)
|
|
3083
3031
|
if 0 < len(args):
|
|
3084
|
-
self.
|
|
3085
|
-
if "
|
|
3086
|
-
self.
|
|
3032
|
+
self.Kind = args[0]
|
|
3033
|
+
if "Kind" in kwargs:
|
|
3034
|
+
self.Kind = kwargs["Kind"]
|
|
3087
3035
|
if 1 < len(args):
|
|
3088
|
-
self.
|
|
3089
|
-
if "
|
|
3090
|
-
self.
|
|
3036
|
+
self.MessageIDs = args[1]
|
|
3037
|
+
if "MessageIDs" in kwargs:
|
|
3038
|
+
self.MessageIDs = kwargs["MessageIDs"]
|
|
3091
3039
|
if 2 < len(args):
|
|
3092
|
-
self.
|
|
3093
|
-
if "
|
|
3094
|
-
self.
|
|
3040
|
+
self.JID = args[2]
|
|
3041
|
+
if "JID" in kwargs:
|
|
3042
|
+
self.JID = kwargs["JID"]
|
|
3043
|
+
if 3 < len(args):
|
|
3044
|
+
self.GroupJID = args[3]
|
|
3045
|
+
if "GroupJID" in kwargs:
|
|
3046
|
+
self.GroupJID = kwargs["GroupJID"]
|
|
3047
|
+
if 4 < len(args):
|
|
3048
|
+
self.Timestamp = args[4]
|
|
3049
|
+
if "Timestamp" in kwargs:
|
|
3050
|
+
self.Timestamp = kwargs["Timestamp"]
|
|
3051
|
+
if 5 < len(args):
|
|
3052
|
+
self.IsCarbon = args[5]
|
|
3053
|
+
if "IsCarbon" in kwargs:
|
|
3054
|
+
self.IsCarbon = kwargs["IsCarbon"]
|
|
3095
3055
|
def __del__(self):
|
|
3096
3056
|
_whatsapp.DecRef(self.handle)
|
|
3097
3057
|
def __str__(self):
|
|
3098
3058
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3099
|
-
sv = 'whatsapp.
|
|
3059
|
+
sv = 'whatsapp.Receipt{'
|
|
3100
3060
|
first = True
|
|
3101
3061
|
for v in pr:
|
|
3102
3062
|
if callable(v[1]):
|
|
@@ -3109,42 +3069,69 @@ class Album(go.GoClass):
|
|
|
3109
3069
|
return sv + '}'
|
|
3110
3070
|
def __repr__(self):
|
|
3111
3071
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3112
|
-
sv = 'whatsapp.
|
|
3072
|
+
sv = 'whatsapp.Receipt ( '
|
|
3113
3073
|
for v in pr:
|
|
3114
3074
|
if not callable(v[1]):
|
|
3115
3075
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
3116
3076
|
return sv + ')'
|
|
3117
3077
|
@property
|
|
3118
|
-
def
|
|
3119
|
-
return _whatsapp.
|
|
3120
|
-
@
|
|
3121
|
-
def
|
|
3078
|
+
def Kind(self):
|
|
3079
|
+
return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
|
|
3080
|
+
@Kind.setter
|
|
3081
|
+
def Kind(self, value):
|
|
3122
3082
|
if isinstance(value, go.GoClass):
|
|
3123
|
-
_whatsapp.
|
|
3083
|
+
_whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
|
|
3124
3084
|
else:
|
|
3125
|
-
_whatsapp.
|
|
3085
|
+
_whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
|
|
3126
3086
|
@property
|
|
3127
|
-
def
|
|
3128
|
-
return _whatsapp.
|
|
3129
|
-
@
|
|
3130
|
-
def
|
|
3087
|
+
def MessageIDs(self):
|
|
3088
|
+
return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
|
|
3089
|
+
@MessageIDs.setter
|
|
3090
|
+
def MessageIDs(self, value):
|
|
3131
3091
|
if isinstance(value, go.GoClass):
|
|
3132
|
-
_whatsapp.
|
|
3092
|
+
_whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
|
|
3133
3093
|
else:
|
|
3134
|
-
|
|
3094
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
3135
3095
|
@property
|
|
3136
|
-
def
|
|
3137
|
-
return _whatsapp.
|
|
3138
|
-
@
|
|
3139
|
-
def
|
|
3096
|
+
def JID(self):
|
|
3097
|
+
return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
|
|
3098
|
+
@JID.setter
|
|
3099
|
+
def JID(self, value):
|
|
3140
3100
|
if isinstance(value, go.GoClass):
|
|
3141
|
-
_whatsapp.
|
|
3101
|
+
_whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
|
|
3142
3102
|
else:
|
|
3143
|
-
_whatsapp.
|
|
3103
|
+
_whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
|
|
3104
|
+
@property
|
|
3105
|
+
def GroupJID(self):
|
|
3106
|
+
return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
|
|
3107
|
+
@GroupJID.setter
|
|
3108
|
+
def GroupJID(self, value):
|
|
3109
|
+
if isinstance(value, go.GoClass):
|
|
3110
|
+
_whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
|
|
3111
|
+
else:
|
|
3112
|
+
_whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
|
|
3113
|
+
@property
|
|
3114
|
+
def Timestamp(self):
|
|
3115
|
+
return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
|
|
3116
|
+
@Timestamp.setter
|
|
3117
|
+
def Timestamp(self, value):
|
|
3118
|
+
if isinstance(value, go.GoClass):
|
|
3119
|
+
_whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
|
|
3120
|
+
else:
|
|
3121
|
+
_whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
|
|
3122
|
+
@property
|
|
3123
|
+
def IsCarbon(self):
|
|
3124
|
+
return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
|
|
3125
|
+
@IsCarbon.setter
|
|
3126
|
+
def IsCarbon(self, value):
|
|
3127
|
+
if isinstance(value, go.GoClass):
|
|
3128
|
+
_whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
|
|
3129
|
+
else:
|
|
3130
|
+
_whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
|
|
3144
3131
|
|
|
3145
|
-
# Python type for struct whatsapp.
|
|
3146
|
-
class
|
|
3147
|
-
"""
|
|
3132
|
+
# Python type for struct whatsapp.Call
|
|
3133
|
+
class Call(go.GoClass):
|
|
3134
|
+
"""A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
|
|
3148
3135
|
def __init__(self, *args, **kwargs):
|
|
3149
3136
|
"""
|
|
3150
3137
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -3158,21 +3145,25 @@ class Connect(go.GoClass):
|
|
|
3158
3145
|
self.handle = args[0].handle
|
|
3159
3146
|
_whatsapp.IncRef(self.handle)
|
|
3160
3147
|
else:
|
|
3161
|
-
self.handle = _whatsapp.
|
|
3148
|
+
self.handle = _whatsapp.whatsapp_Call_CTor()
|
|
3162
3149
|
_whatsapp.IncRef(self.handle)
|
|
3163
3150
|
if 0 < len(args):
|
|
3164
|
-
self.
|
|
3151
|
+
self.State = args[0]
|
|
3152
|
+
if "State" in kwargs:
|
|
3153
|
+
self.State = kwargs["State"]
|
|
3154
|
+
if 1 < len(args):
|
|
3155
|
+
self.JID = args[1]
|
|
3165
3156
|
if "JID" in kwargs:
|
|
3166
3157
|
self.JID = kwargs["JID"]
|
|
3167
|
-
if
|
|
3168
|
-
self.
|
|
3169
|
-
if "
|
|
3170
|
-
self.
|
|
3158
|
+
if 2 < len(args):
|
|
3159
|
+
self.Timestamp = args[2]
|
|
3160
|
+
if "Timestamp" in kwargs:
|
|
3161
|
+
self.Timestamp = kwargs["Timestamp"]
|
|
3171
3162
|
def __del__(self):
|
|
3172
3163
|
_whatsapp.DecRef(self.handle)
|
|
3173
3164
|
def __str__(self):
|
|
3174
3165
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3175
|
-
sv = 'whatsapp.
|
|
3166
|
+
sv = 'whatsapp.Call{'
|
|
3176
3167
|
first = True
|
|
3177
3168
|
for v in pr:
|
|
3178
3169
|
if callable(v[1]):
|
|
@@ -3185,29 +3176,38 @@ class Connect(go.GoClass):
|
|
|
3185
3176
|
return sv + '}'
|
|
3186
3177
|
def __repr__(self):
|
|
3187
3178
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3188
|
-
sv = 'whatsapp.
|
|
3179
|
+
sv = 'whatsapp.Call ( '
|
|
3189
3180
|
for v in pr:
|
|
3190
3181
|
if not callable(v[1]):
|
|
3191
3182
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
3192
3183
|
return sv + ')'
|
|
3193
3184
|
@property
|
|
3185
|
+
def State(self):
|
|
3186
|
+
return _whatsapp.whatsapp_Call_State_Get(self.handle)
|
|
3187
|
+
@State.setter
|
|
3188
|
+
def State(self, value):
|
|
3189
|
+
if isinstance(value, go.GoClass):
|
|
3190
|
+
_whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
|
|
3191
|
+
else:
|
|
3192
|
+
_whatsapp.whatsapp_Call_State_Set(self.handle, value)
|
|
3193
|
+
@property
|
|
3194
3194
|
def JID(self):
|
|
3195
|
-
return _whatsapp.
|
|
3195
|
+
return _whatsapp.whatsapp_Call_JID_Get(self.handle)
|
|
3196
3196
|
@JID.setter
|
|
3197
3197
|
def JID(self, value):
|
|
3198
3198
|
if isinstance(value, go.GoClass):
|
|
3199
|
-
_whatsapp.
|
|
3199
|
+
_whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
|
|
3200
3200
|
else:
|
|
3201
|
-
_whatsapp.
|
|
3201
|
+
_whatsapp.whatsapp_Call_JID_Set(self.handle, value)
|
|
3202
3202
|
@property
|
|
3203
|
-
def
|
|
3204
|
-
return _whatsapp.
|
|
3205
|
-
@
|
|
3206
|
-
def
|
|
3203
|
+
def Timestamp(self):
|
|
3204
|
+
return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
|
|
3205
|
+
@Timestamp.setter
|
|
3206
|
+
def Timestamp(self, value):
|
|
3207
3207
|
if isinstance(value, go.GoClass):
|
|
3208
|
-
_whatsapp.
|
|
3208
|
+
_whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
|
|
3209
3209
|
else:
|
|
3210
|
-
_whatsapp.
|
|
3210
|
+
_whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
|
|
3211
3211
|
|
|
3212
3212
|
|
|
3213
3213
|
# ---- Slices ---
|