slidge-whatsapp 0.3.0__cp311-cp311-manylinux_2_36_aarch64.whl → 0.3.1__cp311-cp311-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 +33 -9
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.h +150 -150
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +130 -130
- slidge_whatsapp/generated/whatsapp.c +1478 -1478
- slidge_whatsapp/generated/whatsapp.go +1123 -1123
- slidge_whatsapp/generated/whatsapp.py +863 -863
- slidge_whatsapp/generated/whatsapp_go.h +150 -150
- slidge_whatsapp/go.mod +5 -5
- slidge_whatsapp/go.sum +14 -14
- slidge_whatsapp/session.go +3 -3
- slidge_whatsapp/vendor/github.com/ebitengine/purego/README.md +21 -5
- slidge_whatsapp/vendor/github.com/ebitengine/purego/abi_loong64.h +60 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/cgo.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlerror.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_netbsd.go +15 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_nocgo_netbsd.go +9 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_stubs.s +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/func.go +113 -60
- slidge_whatsapp/vendor/github.com/ebitengine/purego/gen.go +6 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/go_runtime.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go +2 -2
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go +2 -2
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_loong64.h +60 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_loong64.s +40 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_loong64.go +92 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_netbsd.go +106 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go +4 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go +4 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go +4 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_netbsd.go +26 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/netbsd.go +23 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +11 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go +1 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go +1 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go +1 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_netbsd.go +30 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_loong64.s +71 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s +5 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/nocgo.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/struct_amd64.go +8 -4
- slidge_whatsapp/vendor/github.com/ebitengine/purego/struct_arm64.go +16 -6
- slidge_whatsapp/vendor/github.com/ebitengine/purego/struct_loong64.go +190 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/struct_other.go +6 -2
- slidge_whatsapp/vendor/github.com/ebitengine/purego/sys_amd64.s +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/sys_arm64.s +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/sys_loong64.s +96 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/sys_unix_arm64.s +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/sys_unix_loong64.s +75 -0
- slidge_whatsapp/vendor/github.com/ebitengine/purego/syscall.go +6 -3
- slidge_whatsapp/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go +3 -3
- slidge_whatsapp/vendor/github.com/ebitengine/purego/syscall_sysv.go +13 -10
- slidge_whatsapp/vendor/github.com/ebitengine/purego/syscall_windows.go +1 -1
- slidge_whatsapp/vendor/github.com/ebitengine/purego/zcallback_amd64.s +2002 -2002
- slidge_whatsapp/vendor/github.com/ebitengine/purego/zcallback_arm64.s +4002 -4002
- slidge_whatsapp/vendor/github.com/ebitengine/purego/zcallback_loong64.s +4014 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/module.go +118 -0
- slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +0 -34
- slidge_whatsapp/vendor/go.mau.fi/util/exbytes/string.go +20 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exbytes/writer.go +78 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exslices/cast.go +42 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exslices/chunk.go +28 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exslices/deduplicate.go +67 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exslices/diff.go +63 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +15 -1
- slidge_whatsapp/vendor/go.mau.fi/util/random/string.go +47 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +34 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +1 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +6 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +63 -42
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +14 -10
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +45 -18
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +23 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +5 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +3 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAICommon/WAAICommon.pb.go +7747 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/{waBotMetadata/WABotMetadata.proto → waAICommon/WAAICommon.proto} +269 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +128 -14
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +10 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +3236 -4732
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +125 -273
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +11 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +220 -81
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +13 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +705 -449
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +23 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +78 -24
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +6 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +516 -267
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +22 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/request.go +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +2 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +110 -28
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +12 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +82 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +112 -55
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +8 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/11-redacted-phone-contacts.sql +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +20 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +6 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +7 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +31 -2
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +35 -17
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +14 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +20 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
- slidge_whatsapp/vendor/modules.txt +8 -6
- {slidge_whatsapp-0.3.0.dist-info → slidge_whatsapp-0.3.1.dist-info}/METADATA +1 -1
- {slidge_whatsapp-0.3.0.dist-info → slidge_whatsapp-0.3.1.dist-info}/RECORD +130 -106
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +0 -5156
- {slidge_whatsapp-0.3.0.dist-info → slidge_whatsapp-0.3.1.dist-info}/WHEEL +0 -0
- {slidge_whatsapp-0.3.0.dist-info → slidge_whatsapp-0.3.1.dist-info}/entry_points.txt +0 -0
- {slidge_whatsapp-0.3.0.dist-info → slidge_whatsapp-0.3.1.dist-info}/licenses/LICENSE +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
|
-
"""A
|
|
1016
|
+
# Python type for struct whatsapp.Call
|
|
1017
|
+
class Call(go.GoClass):
|
|
1018
|
+
"""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"""
|
|
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,25 @@ class ChatState(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_Call_CTor()
|
|
1033
1033
|
_whatsapp.IncRef(self.handle)
|
|
1034
1034
|
if 0 < len(args):
|
|
1035
|
-
self.
|
|
1036
|
-
if "
|
|
1037
|
-
self.
|
|
1035
|
+
self.State = args[0]
|
|
1036
|
+
if "State" in kwargs:
|
|
1037
|
+
self.State = kwargs["State"]
|
|
1038
1038
|
if 1 < len(args):
|
|
1039
1039
|
self.JID = args[1]
|
|
1040
1040
|
if "JID" in kwargs:
|
|
1041
1041
|
self.JID = kwargs["JID"]
|
|
1042
1042
|
if 2 < len(args):
|
|
1043
|
-
self.
|
|
1044
|
-
if "
|
|
1045
|
-
self.
|
|
1043
|
+
self.Timestamp = args[2]
|
|
1044
|
+
if "Timestamp" in kwargs:
|
|
1045
|
+
self.Timestamp = kwargs["Timestamp"]
|
|
1046
1046
|
def __del__(self):
|
|
1047
1047
|
_whatsapp.DecRef(self.handle)
|
|
1048
1048
|
def __str__(self):
|
|
1049
1049
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1050
|
-
sv = 'whatsapp.
|
|
1050
|
+
sv = 'whatsapp.Call{'
|
|
1051
1051
|
first = True
|
|
1052
1052
|
for v in pr:
|
|
1053
1053
|
if callable(v[1]):
|
|
@@ -1060,38 +1060,38 @@ class ChatState(go.GoClass):
|
|
|
1060
1060
|
return sv + '}'
|
|
1061
1061
|
def __repr__(self):
|
|
1062
1062
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1063
|
-
sv = 'whatsapp.
|
|
1063
|
+
sv = 'whatsapp.Call ( '
|
|
1064
1064
|
for v in pr:
|
|
1065
1065
|
if not callable(v[1]):
|
|
1066
1066
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1067
1067
|
return sv + ')'
|
|
1068
1068
|
@property
|
|
1069
|
-
def
|
|
1070
|
-
return _whatsapp.
|
|
1071
|
-
@
|
|
1072
|
-
def
|
|
1069
|
+
def State(self):
|
|
1070
|
+
return _whatsapp.whatsapp_Call_State_Get(self.handle)
|
|
1071
|
+
@State.setter
|
|
1072
|
+
def State(self, value):
|
|
1073
1073
|
if isinstance(value, go.GoClass):
|
|
1074
|
-
_whatsapp.
|
|
1074
|
+
_whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
|
|
1075
1075
|
else:
|
|
1076
|
-
_whatsapp.
|
|
1076
|
+
_whatsapp.whatsapp_Call_State_Set(self.handle, value)
|
|
1077
1077
|
@property
|
|
1078
1078
|
def JID(self):
|
|
1079
|
-
return _whatsapp.
|
|
1079
|
+
return _whatsapp.whatsapp_Call_JID_Get(self.handle)
|
|
1080
1080
|
@JID.setter
|
|
1081
1081
|
def JID(self, value):
|
|
1082
1082
|
if isinstance(value, go.GoClass):
|
|
1083
|
-
_whatsapp.
|
|
1083
|
+
_whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
|
|
1084
1084
|
else:
|
|
1085
|
-
_whatsapp.
|
|
1085
|
+
_whatsapp.whatsapp_Call_JID_Set(self.handle, value)
|
|
1086
1086
|
@property
|
|
1087
|
-
def
|
|
1088
|
-
return _whatsapp.
|
|
1089
|
-
@
|
|
1090
|
-
def
|
|
1087
|
+
def Timestamp(self):
|
|
1088
|
+
return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
|
|
1089
|
+
@Timestamp.setter
|
|
1090
|
+
def Timestamp(self, value):
|
|
1091
1091
|
if isinstance(value, go.GoClass):
|
|
1092
|
-
_whatsapp.
|
|
1092
|
+
_whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
|
|
1093
1093
|
else:
|
|
1094
|
-
_whatsapp.
|
|
1094
|
+
_whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
|
|
1095
1095
|
|
|
1096
1096
|
# Python type for struct whatsapp.Contact
|
|
1097
1097
|
class Contact(go.GoClass):
|
|
@@ -1160,190 +1160,6 @@ class Contact(go.GoClass):
|
|
|
1160
1160
|
else:
|
|
1161
1161
|
_whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
|
|
1162
1162
|
|
|
1163
|
-
# Python type for struct whatsapp.EventPayload
|
|
1164
|
-
class EventPayload(go.GoClass):
|
|
1165
|
-
"""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"""
|
|
1166
|
-
def __init__(self, *args, **kwargs):
|
|
1167
|
-
"""
|
|
1168
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
1169
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
|
1170
|
-
in which case a new Go object is constructed first
|
|
1171
|
-
"""
|
|
1172
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
1173
|
-
self.handle = kwargs['handle']
|
|
1174
|
-
_whatsapp.IncRef(self.handle)
|
|
1175
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
1176
|
-
self.handle = args[0].handle
|
|
1177
|
-
_whatsapp.IncRef(self.handle)
|
|
1178
|
-
else:
|
|
1179
|
-
self.handle = _whatsapp.whatsapp_EventPayload_CTor()
|
|
1180
|
-
_whatsapp.IncRef(self.handle)
|
|
1181
|
-
if 0 < len(args):
|
|
1182
|
-
self.QRCode = args[0]
|
|
1183
|
-
if "QRCode" in kwargs:
|
|
1184
|
-
self.QRCode = kwargs["QRCode"]
|
|
1185
|
-
if 1 < len(args):
|
|
1186
|
-
self.PairDeviceID = args[1]
|
|
1187
|
-
if "PairDeviceID" in kwargs:
|
|
1188
|
-
self.PairDeviceID = kwargs["PairDeviceID"]
|
|
1189
|
-
if 2 < len(args):
|
|
1190
|
-
self.Connect = args[2]
|
|
1191
|
-
if "Connect" in kwargs:
|
|
1192
|
-
self.Connect = kwargs["Connect"]
|
|
1193
|
-
if 3 < len(args):
|
|
1194
|
-
self.LoggedOut = args[3]
|
|
1195
|
-
if "LoggedOut" in kwargs:
|
|
1196
|
-
self.LoggedOut = kwargs["LoggedOut"]
|
|
1197
|
-
if 4 < len(args):
|
|
1198
|
-
self.Contact = args[4]
|
|
1199
|
-
if "Contact" in kwargs:
|
|
1200
|
-
self.Contact = kwargs["Contact"]
|
|
1201
|
-
if 5 < len(args):
|
|
1202
|
-
self.Presence = args[5]
|
|
1203
|
-
if "Presence" in kwargs:
|
|
1204
|
-
self.Presence = kwargs["Presence"]
|
|
1205
|
-
if 6 < len(args):
|
|
1206
|
-
self.Message = args[6]
|
|
1207
|
-
if "Message" in kwargs:
|
|
1208
|
-
self.Message = kwargs["Message"]
|
|
1209
|
-
if 7 < len(args):
|
|
1210
|
-
self.ChatState = args[7]
|
|
1211
|
-
if "ChatState" in kwargs:
|
|
1212
|
-
self.ChatState = kwargs["ChatState"]
|
|
1213
|
-
if 8 < len(args):
|
|
1214
|
-
self.Receipt = args[8]
|
|
1215
|
-
if "Receipt" in kwargs:
|
|
1216
|
-
self.Receipt = kwargs["Receipt"]
|
|
1217
|
-
if 9 < len(args):
|
|
1218
|
-
self.Group = args[9]
|
|
1219
|
-
if "Group" in kwargs:
|
|
1220
|
-
self.Group = kwargs["Group"]
|
|
1221
|
-
if 10 < len(args):
|
|
1222
|
-
self.Call = args[10]
|
|
1223
|
-
if "Call" in kwargs:
|
|
1224
|
-
self.Call = kwargs["Call"]
|
|
1225
|
-
def __del__(self):
|
|
1226
|
-
_whatsapp.DecRef(self.handle)
|
|
1227
|
-
def __str__(self):
|
|
1228
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1229
|
-
sv = 'whatsapp.EventPayload{'
|
|
1230
|
-
first = True
|
|
1231
|
-
for v in pr:
|
|
1232
|
-
if callable(v[1]):
|
|
1233
|
-
continue
|
|
1234
|
-
if first:
|
|
1235
|
-
first = False
|
|
1236
|
-
else:
|
|
1237
|
-
sv += ', '
|
|
1238
|
-
sv += v[0] + '=' + str(v[1])
|
|
1239
|
-
return sv + '}'
|
|
1240
|
-
def __repr__(self):
|
|
1241
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1242
|
-
sv = 'whatsapp.EventPayload ( '
|
|
1243
|
-
for v in pr:
|
|
1244
|
-
if not callable(v[1]):
|
|
1245
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1246
|
-
return sv + ')'
|
|
1247
|
-
@property
|
|
1248
|
-
def QRCode(self):
|
|
1249
|
-
return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
|
|
1250
|
-
@QRCode.setter
|
|
1251
|
-
def QRCode(self, value):
|
|
1252
|
-
if isinstance(value, go.GoClass):
|
|
1253
|
-
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
|
|
1254
|
-
else:
|
|
1255
|
-
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
|
|
1256
|
-
@property
|
|
1257
|
-
def PairDeviceID(self):
|
|
1258
|
-
return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
|
|
1259
|
-
@PairDeviceID.setter
|
|
1260
|
-
def PairDeviceID(self, value):
|
|
1261
|
-
if isinstance(value, go.GoClass):
|
|
1262
|
-
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
|
|
1263
|
-
else:
|
|
1264
|
-
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
|
|
1265
|
-
@property
|
|
1266
|
-
def Connect(self):
|
|
1267
|
-
return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
|
|
1268
|
-
@Connect.setter
|
|
1269
|
-
def Connect(self, value):
|
|
1270
|
-
if isinstance(value, go.GoClass):
|
|
1271
|
-
_whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
|
|
1272
|
-
else:
|
|
1273
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1274
|
-
@property
|
|
1275
|
-
def LoggedOut(self):
|
|
1276
|
-
return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
|
|
1277
|
-
@LoggedOut.setter
|
|
1278
|
-
def LoggedOut(self, value):
|
|
1279
|
-
if isinstance(value, go.GoClass):
|
|
1280
|
-
_whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
|
|
1281
|
-
else:
|
|
1282
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1283
|
-
@property
|
|
1284
|
-
def Contact(self):
|
|
1285
|
-
return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
|
|
1286
|
-
@Contact.setter
|
|
1287
|
-
def Contact(self, value):
|
|
1288
|
-
if isinstance(value, go.GoClass):
|
|
1289
|
-
_whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
|
|
1290
|
-
else:
|
|
1291
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1292
|
-
@property
|
|
1293
|
-
def Presence(self):
|
|
1294
|
-
return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
|
|
1295
|
-
@Presence.setter
|
|
1296
|
-
def Presence(self, value):
|
|
1297
|
-
if isinstance(value, go.GoClass):
|
|
1298
|
-
_whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
|
|
1299
|
-
else:
|
|
1300
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1301
|
-
@property
|
|
1302
|
-
def Message(self):
|
|
1303
|
-
return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
|
|
1304
|
-
@Message.setter
|
|
1305
|
-
def Message(self, value):
|
|
1306
|
-
if isinstance(value, go.GoClass):
|
|
1307
|
-
_whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
|
|
1308
|
-
else:
|
|
1309
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1310
|
-
@property
|
|
1311
|
-
def ChatState(self):
|
|
1312
|
-
return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
|
|
1313
|
-
@ChatState.setter
|
|
1314
|
-
def ChatState(self, value):
|
|
1315
|
-
if isinstance(value, go.GoClass):
|
|
1316
|
-
_whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
|
|
1317
|
-
else:
|
|
1318
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1319
|
-
@property
|
|
1320
|
-
def Receipt(self):
|
|
1321
|
-
return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
|
|
1322
|
-
@Receipt.setter
|
|
1323
|
-
def Receipt(self, value):
|
|
1324
|
-
if isinstance(value, go.GoClass):
|
|
1325
|
-
_whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
|
|
1326
|
-
else:
|
|
1327
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1328
|
-
@property
|
|
1329
|
-
def Group(self):
|
|
1330
|
-
return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
|
|
1331
|
-
@Group.setter
|
|
1332
|
-
def Group(self, value):
|
|
1333
|
-
if isinstance(value, go.GoClass):
|
|
1334
|
-
_whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
|
|
1335
|
-
else:
|
|
1336
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1337
|
-
@property
|
|
1338
|
-
def Call(self):
|
|
1339
|
-
return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
|
|
1340
|
-
@Call.setter
|
|
1341
|
-
def Call(self, value):
|
|
1342
|
-
if isinstance(value, go.GoClass):
|
|
1343
|
-
_whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
|
|
1344
|
-
else:
|
|
1345
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1346
|
-
|
|
1347
1163
|
# Python type for struct whatsapp.Group
|
|
1348
1164
|
class Group(go.GoClass):
|
|
1349
1165
|
"""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"""
|
|
@@ -1556,9 +1372,9 @@ class GroupParticipant(go.GoClass):
|
|
|
1556
1372
|
else:
|
|
1557
1373
|
_whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
|
|
1558
1374
|
|
|
1559
|
-
# Python type for struct whatsapp.
|
|
1560
|
-
class
|
|
1561
|
-
"""
|
|
1375
|
+
# Python type for struct whatsapp.LoggedOut
|
|
1376
|
+
class LoggedOut(go.GoClass):
|
|
1377
|
+
"""LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
|
|
1562
1378
|
def __init__(self, *args, **kwargs):
|
|
1563
1379
|
"""
|
|
1564
1380
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1572,25 +1388,17 @@ class GroupSubject(go.GoClass):
|
|
|
1572
1388
|
self.handle = args[0].handle
|
|
1573
1389
|
_whatsapp.IncRef(self.handle)
|
|
1574
1390
|
else:
|
|
1575
|
-
self.handle = _whatsapp.
|
|
1391
|
+
self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
|
|
1576
1392
|
_whatsapp.IncRef(self.handle)
|
|
1577
1393
|
if 0 < len(args):
|
|
1578
|
-
self.
|
|
1579
|
-
if "
|
|
1580
|
-
self.
|
|
1581
|
-
if 1 < len(args):
|
|
1582
|
-
self.SetAt = args[1]
|
|
1583
|
-
if "SetAt" in kwargs:
|
|
1584
|
-
self.SetAt = kwargs["SetAt"]
|
|
1585
|
-
if 2 < len(args):
|
|
1586
|
-
self.SetBy = args[2]
|
|
1587
|
-
if "SetBy" in kwargs:
|
|
1588
|
-
self.SetBy = kwargs["SetBy"]
|
|
1394
|
+
self.Reason = args[0]
|
|
1395
|
+
if "Reason" in kwargs:
|
|
1396
|
+
self.Reason = kwargs["Reason"]
|
|
1589
1397
|
def __del__(self):
|
|
1590
1398
|
_whatsapp.DecRef(self.handle)
|
|
1591
1399
|
def __str__(self):
|
|
1592
1400
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1593
|
-
sv = 'whatsapp.
|
|
1401
|
+
sv = 'whatsapp.LoggedOut{'
|
|
1594
1402
|
first = True
|
|
1595
1403
|
for v in pr:
|
|
1596
1404
|
if callable(v[1]):
|
|
@@ -1603,38 +1411,20 @@ class GroupSubject(go.GoClass):
|
|
|
1603
1411
|
return sv + '}'
|
|
1604
1412
|
def __repr__(self):
|
|
1605
1413
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1606
|
-
sv = 'whatsapp.
|
|
1414
|
+
sv = 'whatsapp.LoggedOut ( '
|
|
1607
1415
|
for v in pr:
|
|
1608
1416
|
if not callable(v[1]):
|
|
1609
1417
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1610
1418
|
return sv + ')'
|
|
1611
1419
|
@property
|
|
1612
|
-
def
|
|
1613
|
-
return _whatsapp.
|
|
1614
|
-
@
|
|
1615
|
-
def
|
|
1616
|
-
if isinstance(value, go.GoClass):
|
|
1617
|
-
_whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
|
|
1618
|
-
else:
|
|
1619
|
-
_whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
|
|
1620
|
-
@property
|
|
1621
|
-
def SetAt(self):
|
|
1622
|
-
return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
|
|
1623
|
-
@SetAt.setter
|
|
1624
|
-
def SetAt(self, value):
|
|
1625
|
-
if isinstance(value, go.GoClass):
|
|
1626
|
-
_whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
|
|
1627
|
-
else:
|
|
1628
|
-
_whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
|
|
1629
|
-
@property
|
|
1630
|
-
def SetBy(self):
|
|
1631
|
-
return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
|
|
1632
|
-
@SetBy.setter
|
|
1633
|
-
def SetBy(self, value):
|
|
1420
|
+
def Reason(self):
|
|
1421
|
+
return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
|
|
1422
|
+
@Reason.setter
|
|
1423
|
+
def Reason(self, value):
|
|
1634
1424
|
if isinstance(value, go.GoClass):
|
|
1635
|
-
_whatsapp.
|
|
1425
|
+
_whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
|
|
1636
1426
|
else:
|
|
1637
|
-
_whatsapp.
|
|
1427
|
+
_whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
|
|
1638
1428
|
|
|
1639
1429
|
# Python type for struct whatsapp.Poll
|
|
1640
1430
|
class Poll(go.GoClass):
|
|
@@ -1703,6 +1493,86 @@ class Poll(go.GoClass):
|
|
|
1703
1493
|
else:
|
|
1704
1494
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1705
1495
|
|
|
1496
|
+
# Python type for struct whatsapp.Presence
|
|
1497
|
+
class Presence(go.GoClass):
|
|
1498
|
+
"""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"""
|
|
1499
|
+
def __init__(self, *args, **kwargs):
|
|
1500
|
+
"""
|
|
1501
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
1502
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
|
1503
|
+
in which case a new Go object is constructed first
|
|
1504
|
+
"""
|
|
1505
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
1506
|
+
self.handle = kwargs['handle']
|
|
1507
|
+
_whatsapp.IncRef(self.handle)
|
|
1508
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
1509
|
+
self.handle = args[0].handle
|
|
1510
|
+
_whatsapp.IncRef(self.handle)
|
|
1511
|
+
else:
|
|
1512
|
+
self.handle = _whatsapp.whatsapp_Presence_CTor()
|
|
1513
|
+
_whatsapp.IncRef(self.handle)
|
|
1514
|
+
if 0 < len(args):
|
|
1515
|
+
self.JID = args[0]
|
|
1516
|
+
if "JID" in kwargs:
|
|
1517
|
+
self.JID = kwargs["JID"]
|
|
1518
|
+
if 1 < len(args):
|
|
1519
|
+
self.Kind = args[1]
|
|
1520
|
+
if "Kind" in kwargs:
|
|
1521
|
+
self.Kind = kwargs["Kind"]
|
|
1522
|
+
if 2 < len(args):
|
|
1523
|
+
self.LastSeen = args[2]
|
|
1524
|
+
if "LastSeen" in kwargs:
|
|
1525
|
+
self.LastSeen = kwargs["LastSeen"]
|
|
1526
|
+
def __del__(self):
|
|
1527
|
+
_whatsapp.DecRef(self.handle)
|
|
1528
|
+
def __str__(self):
|
|
1529
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1530
|
+
sv = 'whatsapp.Presence{'
|
|
1531
|
+
first = True
|
|
1532
|
+
for v in pr:
|
|
1533
|
+
if callable(v[1]):
|
|
1534
|
+
continue
|
|
1535
|
+
if first:
|
|
1536
|
+
first = False
|
|
1537
|
+
else:
|
|
1538
|
+
sv += ', '
|
|
1539
|
+
sv += v[0] + '=' + str(v[1])
|
|
1540
|
+
return sv + '}'
|
|
1541
|
+
def __repr__(self):
|
|
1542
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1543
|
+
sv = 'whatsapp.Presence ( '
|
|
1544
|
+
for v in pr:
|
|
1545
|
+
if not callable(v[1]):
|
|
1546
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1547
|
+
return sv + ')'
|
|
1548
|
+
@property
|
|
1549
|
+
def JID(self):
|
|
1550
|
+
return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
|
|
1551
|
+
@JID.setter
|
|
1552
|
+
def JID(self, value):
|
|
1553
|
+
if isinstance(value, go.GoClass):
|
|
1554
|
+
_whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
|
|
1555
|
+
else:
|
|
1556
|
+
_whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
|
|
1557
|
+
@property
|
|
1558
|
+
def Kind(self):
|
|
1559
|
+
return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
|
|
1560
|
+
@Kind.setter
|
|
1561
|
+
def Kind(self, value):
|
|
1562
|
+
if isinstance(value, go.GoClass):
|
|
1563
|
+
_whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
|
|
1564
|
+
else:
|
|
1565
|
+
_whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
|
|
1566
|
+
@property
|
|
1567
|
+
def LastSeen(self):
|
|
1568
|
+
return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
|
|
1569
|
+
@LastSeen.setter
|
|
1570
|
+
def LastSeen(self, value):
|
|
1571
|
+
if isinstance(value, go.GoClass):
|
|
1572
|
+
_whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
|
|
1573
|
+
else:
|
|
1574
|
+
_whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
|
|
1575
|
+
|
|
1706
1576
|
# Python type for struct whatsapp.Receipt
|
|
1707
1577
|
class Receipt(go.GoClass):
|
|
1708
1578
|
"""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"""
|
|
@@ -1822,9 +1692,9 @@ class Receipt(go.GoClass):
|
|
|
1822
1692
|
else:
|
|
1823
1693
|
_whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
|
|
1824
1694
|
|
|
1825
|
-
# Python type for struct whatsapp.
|
|
1826
|
-
class
|
|
1827
|
-
"""A
|
|
1695
|
+
# Python type for struct whatsapp.Attachment
|
|
1696
|
+
class Attachment(go.GoClass):
|
|
1697
|
+
"""A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
|
|
1828
1698
|
def __init__(self, *args, **kwargs):
|
|
1829
1699
|
"""
|
|
1830
1700
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1838,25 +1708,29 @@ class Album(go.GoClass):
|
|
|
1838
1708
|
self.handle = args[0].handle
|
|
1839
1709
|
_whatsapp.IncRef(self.handle)
|
|
1840
1710
|
else:
|
|
1841
|
-
self.handle = _whatsapp.
|
|
1711
|
+
self.handle = _whatsapp.whatsapp_Attachment_CTor()
|
|
1842
1712
|
_whatsapp.IncRef(self.handle)
|
|
1843
1713
|
if 0 < len(args):
|
|
1844
|
-
self.
|
|
1845
|
-
if "
|
|
1846
|
-
self.
|
|
1714
|
+
self.MIME = args[0]
|
|
1715
|
+
if "MIME" in kwargs:
|
|
1716
|
+
self.MIME = kwargs["MIME"]
|
|
1847
1717
|
if 1 < len(args):
|
|
1848
|
-
self.
|
|
1849
|
-
if "
|
|
1850
|
-
self.
|
|
1718
|
+
self.Filename = args[1]
|
|
1719
|
+
if "Filename" in kwargs:
|
|
1720
|
+
self.Filename = kwargs["Filename"]
|
|
1851
1721
|
if 2 < len(args):
|
|
1852
|
-
self.
|
|
1853
|
-
if "
|
|
1854
|
-
self.
|
|
1722
|
+
self.Caption = args[2]
|
|
1723
|
+
if "Caption" in kwargs:
|
|
1724
|
+
self.Caption = kwargs["Caption"]
|
|
1725
|
+
if 3 < len(args):
|
|
1726
|
+
self.Data = args[3]
|
|
1727
|
+
if "Data" in kwargs:
|
|
1728
|
+
self.Data = kwargs["Data"]
|
|
1855
1729
|
def __del__(self):
|
|
1856
1730
|
_whatsapp.DecRef(self.handle)
|
|
1857
1731
|
def __str__(self):
|
|
1858
1732
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1859
|
-
sv = 'whatsapp.
|
|
1733
|
+
sv = 'whatsapp.Attachment{'
|
|
1860
1734
|
first = True
|
|
1861
1735
|
for v in pr:
|
|
1862
1736
|
if callable(v[1]):
|
|
@@ -1869,42 +1743,57 @@ class Album(go.GoClass):
|
|
|
1869
1743
|
return sv + '}'
|
|
1870
1744
|
def __repr__(self):
|
|
1871
1745
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1872
|
-
sv = 'whatsapp.
|
|
1746
|
+
sv = 'whatsapp.Attachment ( '
|
|
1873
1747
|
for v in pr:
|
|
1874
1748
|
if not callable(v[1]):
|
|
1875
1749
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1876
1750
|
return sv + ')'
|
|
1877
1751
|
@property
|
|
1878
|
-
def
|
|
1879
|
-
return _whatsapp.
|
|
1880
|
-
@
|
|
1881
|
-
def
|
|
1752
|
+
def MIME(self):
|
|
1753
|
+
return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
|
|
1754
|
+
@MIME.setter
|
|
1755
|
+
def MIME(self, value):
|
|
1882
1756
|
if isinstance(value, go.GoClass):
|
|
1883
|
-
_whatsapp.
|
|
1757
|
+
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
|
|
1884
1758
|
else:
|
|
1885
|
-
_whatsapp.
|
|
1759
|
+
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
|
|
1886
1760
|
@property
|
|
1887
|
-
def
|
|
1888
|
-
return _whatsapp.
|
|
1889
|
-
@
|
|
1890
|
-
def
|
|
1761
|
+
def Filename(self):
|
|
1762
|
+
return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
|
|
1763
|
+
@Filename.setter
|
|
1764
|
+
def Filename(self, value):
|
|
1891
1765
|
if isinstance(value, go.GoClass):
|
|
1892
|
-
_whatsapp.
|
|
1766
|
+
_whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
|
|
1893
1767
|
else:
|
|
1894
|
-
_whatsapp.
|
|
1768
|
+
_whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
|
|
1895
1769
|
@property
|
|
1896
|
-
def
|
|
1897
|
-
return _whatsapp.
|
|
1898
|
-
@
|
|
1899
|
-
def
|
|
1770
|
+
def Caption(self):
|
|
1771
|
+
return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
|
|
1772
|
+
@Caption.setter
|
|
1773
|
+
def Caption(self, value):
|
|
1900
1774
|
if isinstance(value, go.GoClass):
|
|
1901
|
-
_whatsapp.
|
|
1775
|
+
_whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
|
|
1902
1776
|
else:
|
|
1903
|
-
_whatsapp.
|
|
1777
|
+
_whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
|
|
1778
|
+
@property
|
|
1779
|
+
def Data(self):
|
|
1780
|
+
return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
|
|
1781
|
+
@Data.setter
|
|
1782
|
+
def Data(self, value):
|
|
1783
|
+
if isinstance(value, go.GoClass):
|
|
1784
|
+
_whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
|
|
1785
|
+
else:
|
|
1786
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1787
|
+
def GetSpec(self, ctx):
|
|
1788
|
+
"""GetSpec(object ctx) object, str
|
|
1789
|
+
|
|
1790
|
+
GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
|
|
1791
|
+
"""
|
|
1792
|
+
return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
|
|
1904
1793
|
|
|
1905
|
-
# Python type for struct whatsapp.
|
|
1906
|
-
class
|
|
1907
|
-
"""
|
|
1794
|
+
# Python type for struct whatsapp.Connect
|
|
1795
|
+
class Connect(go.GoClass):
|
|
1796
|
+
"""Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
|
|
1908
1797
|
def __init__(self, *args, **kwargs):
|
|
1909
1798
|
"""
|
|
1910
1799
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1918,25 +1807,21 @@ class Call(go.GoClass):
|
|
|
1918
1807
|
self.handle = args[0].handle
|
|
1919
1808
|
_whatsapp.IncRef(self.handle)
|
|
1920
1809
|
else:
|
|
1921
|
-
self.handle = _whatsapp.
|
|
1810
|
+
self.handle = _whatsapp.whatsapp_Connect_CTor()
|
|
1922
1811
|
_whatsapp.IncRef(self.handle)
|
|
1923
1812
|
if 0 < len(args):
|
|
1924
|
-
self.
|
|
1925
|
-
if "State" in kwargs:
|
|
1926
|
-
self.State = kwargs["State"]
|
|
1927
|
-
if 1 < len(args):
|
|
1928
|
-
self.JID = args[1]
|
|
1813
|
+
self.JID = args[0]
|
|
1929
1814
|
if "JID" in kwargs:
|
|
1930
1815
|
self.JID = kwargs["JID"]
|
|
1931
|
-
if
|
|
1932
|
-
self.
|
|
1933
|
-
if "
|
|
1934
|
-
self.
|
|
1816
|
+
if 1 < len(args):
|
|
1817
|
+
self.Error = args[1]
|
|
1818
|
+
if "Error" in kwargs:
|
|
1819
|
+
self.Error = kwargs["Error"]
|
|
1935
1820
|
def __del__(self):
|
|
1936
1821
|
_whatsapp.DecRef(self.handle)
|
|
1937
1822
|
def __str__(self):
|
|
1938
1823
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1939
|
-
sv = 'whatsapp.
|
|
1824
|
+
sv = 'whatsapp.Connect{'
|
|
1940
1825
|
first = True
|
|
1941
1826
|
for v in pr:
|
|
1942
1827
|
if callable(v[1]):
|
|
@@ -1949,42 +1834,33 @@ class Call(go.GoClass):
|
|
|
1949
1834
|
return sv + '}'
|
|
1950
1835
|
def __repr__(self):
|
|
1951
1836
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
1952
|
-
sv = 'whatsapp.
|
|
1837
|
+
sv = 'whatsapp.Connect ( '
|
|
1953
1838
|
for v in pr:
|
|
1954
1839
|
if not callable(v[1]):
|
|
1955
1840
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
1956
1841
|
return sv + ')'
|
|
1957
1842
|
@property
|
|
1958
|
-
def State(self):
|
|
1959
|
-
return _whatsapp.whatsapp_Call_State_Get(self.handle)
|
|
1960
|
-
@State.setter
|
|
1961
|
-
def State(self, value):
|
|
1962
|
-
if isinstance(value, go.GoClass):
|
|
1963
|
-
_whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
|
|
1964
|
-
else:
|
|
1965
|
-
_whatsapp.whatsapp_Call_State_Set(self.handle, value)
|
|
1966
|
-
@property
|
|
1967
1843
|
def JID(self):
|
|
1968
|
-
return _whatsapp.
|
|
1844
|
+
return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
|
|
1969
1845
|
@JID.setter
|
|
1970
1846
|
def JID(self, value):
|
|
1971
1847
|
if isinstance(value, go.GoClass):
|
|
1972
|
-
_whatsapp.
|
|
1848
|
+
_whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
|
|
1973
1849
|
else:
|
|
1974
|
-
_whatsapp.
|
|
1850
|
+
_whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
|
|
1975
1851
|
@property
|
|
1976
|
-
def
|
|
1977
|
-
return _whatsapp.
|
|
1978
|
-
@
|
|
1979
|
-
def
|
|
1852
|
+
def Error(self):
|
|
1853
|
+
return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
|
|
1854
|
+
@Error.setter
|
|
1855
|
+
def Error(self, value):
|
|
1980
1856
|
if isinstance(value, go.GoClass):
|
|
1981
|
-
_whatsapp.
|
|
1857
|
+
_whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
|
|
1982
1858
|
else:
|
|
1983
|
-
_whatsapp.
|
|
1859
|
+
_whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
|
|
1984
1860
|
|
|
1985
|
-
# Python type for struct whatsapp.
|
|
1986
|
-
class
|
|
1987
|
-
"""
|
|
1861
|
+
# Python type for struct whatsapp.EventPayload
|
|
1862
|
+
class EventPayload(go.GoClass):
|
|
1863
|
+
"""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"""
|
|
1988
1864
|
def __init__(self, *args, **kwargs):
|
|
1989
1865
|
"""
|
|
1990
1866
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -1998,17 +1874,57 @@ class LoggedOut(go.GoClass):
|
|
|
1998
1874
|
self.handle = args[0].handle
|
|
1999
1875
|
_whatsapp.IncRef(self.handle)
|
|
2000
1876
|
else:
|
|
2001
|
-
self.handle = _whatsapp.
|
|
1877
|
+
self.handle = _whatsapp.whatsapp_EventPayload_CTor()
|
|
2002
1878
|
_whatsapp.IncRef(self.handle)
|
|
2003
1879
|
if 0 < len(args):
|
|
2004
|
-
self.
|
|
2005
|
-
if "
|
|
2006
|
-
self.
|
|
1880
|
+
self.QRCode = args[0]
|
|
1881
|
+
if "QRCode" in kwargs:
|
|
1882
|
+
self.QRCode = kwargs["QRCode"]
|
|
1883
|
+
if 1 < len(args):
|
|
1884
|
+
self.PairDeviceID = args[1]
|
|
1885
|
+
if "PairDeviceID" in kwargs:
|
|
1886
|
+
self.PairDeviceID = kwargs["PairDeviceID"]
|
|
1887
|
+
if 2 < len(args):
|
|
1888
|
+
self.Connect = args[2]
|
|
1889
|
+
if "Connect" in kwargs:
|
|
1890
|
+
self.Connect = kwargs["Connect"]
|
|
1891
|
+
if 3 < len(args):
|
|
1892
|
+
self.LoggedOut = args[3]
|
|
1893
|
+
if "LoggedOut" in kwargs:
|
|
1894
|
+
self.LoggedOut = kwargs["LoggedOut"]
|
|
1895
|
+
if 4 < len(args):
|
|
1896
|
+
self.Contact = args[4]
|
|
1897
|
+
if "Contact" in kwargs:
|
|
1898
|
+
self.Contact = kwargs["Contact"]
|
|
1899
|
+
if 5 < len(args):
|
|
1900
|
+
self.Presence = args[5]
|
|
1901
|
+
if "Presence" in kwargs:
|
|
1902
|
+
self.Presence = kwargs["Presence"]
|
|
1903
|
+
if 6 < len(args):
|
|
1904
|
+
self.Message = args[6]
|
|
1905
|
+
if "Message" in kwargs:
|
|
1906
|
+
self.Message = kwargs["Message"]
|
|
1907
|
+
if 7 < len(args):
|
|
1908
|
+
self.ChatState = args[7]
|
|
1909
|
+
if "ChatState" in kwargs:
|
|
1910
|
+
self.ChatState = kwargs["ChatState"]
|
|
1911
|
+
if 8 < len(args):
|
|
1912
|
+
self.Receipt = args[8]
|
|
1913
|
+
if "Receipt" in kwargs:
|
|
1914
|
+
self.Receipt = kwargs["Receipt"]
|
|
1915
|
+
if 9 < len(args):
|
|
1916
|
+
self.Group = args[9]
|
|
1917
|
+
if "Group" in kwargs:
|
|
1918
|
+
self.Group = kwargs["Group"]
|
|
1919
|
+
if 10 < len(args):
|
|
1920
|
+
self.Call = args[10]
|
|
1921
|
+
if "Call" in kwargs:
|
|
1922
|
+
self.Call = kwargs["Call"]
|
|
2007
1923
|
def __del__(self):
|
|
2008
1924
|
_whatsapp.DecRef(self.handle)
|
|
2009
1925
|
def __str__(self):
|
|
2010
1926
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2011
|
-
sv = 'whatsapp.
|
|
1927
|
+
sv = 'whatsapp.EventPayload{'
|
|
2012
1928
|
first = True
|
|
2013
1929
|
for v in pr:
|
|
2014
1930
|
if callable(v[1]):
|
|
@@ -2021,24 +1937,114 @@ class LoggedOut(go.GoClass):
|
|
|
2021
1937
|
return sv + '}'
|
|
2022
1938
|
def __repr__(self):
|
|
2023
1939
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2024
|
-
sv = 'whatsapp.
|
|
1940
|
+
sv = 'whatsapp.EventPayload ( '
|
|
2025
1941
|
for v in pr:
|
|
2026
1942
|
if not callable(v[1]):
|
|
2027
1943
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2028
1944
|
return sv + ')'
|
|
2029
1945
|
@property
|
|
2030
|
-
def
|
|
2031
|
-
return _whatsapp.
|
|
2032
|
-
@
|
|
2033
|
-
def
|
|
1946
|
+
def QRCode(self):
|
|
1947
|
+
return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
|
|
1948
|
+
@QRCode.setter
|
|
1949
|
+
def QRCode(self, value):
|
|
2034
1950
|
if isinstance(value, go.GoClass):
|
|
2035
|
-
_whatsapp.
|
|
1951
|
+
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
|
|
2036
1952
|
else:
|
|
2037
|
-
_whatsapp.
|
|
1953
|
+
_whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
|
|
1954
|
+
@property
|
|
1955
|
+
def PairDeviceID(self):
|
|
1956
|
+
return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
|
|
1957
|
+
@PairDeviceID.setter
|
|
1958
|
+
def PairDeviceID(self, value):
|
|
1959
|
+
if isinstance(value, go.GoClass):
|
|
1960
|
+
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
|
|
1961
|
+
else:
|
|
1962
|
+
_whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
|
|
1963
|
+
@property
|
|
1964
|
+
def Connect(self):
|
|
1965
|
+
return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
|
|
1966
|
+
@Connect.setter
|
|
1967
|
+
def Connect(self, value):
|
|
1968
|
+
if isinstance(value, go.GoClass):
|
|
1969
|
+
_whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
|
|
1970
|
+
else:
|
|
1971
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1972
|
+
@property
|
|
1973
|
+
def LoggedOut(self):
|
|
1974
|
+
return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
|
|
1975
|
+
@LoggedOut.setter
|
|
1976
|
+
def LoggedOut(self, value):
|
|
1977
|
+
if isinstance(value, go.GoClass):
|
|
1978
|
+
_whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
|
|
1979
|
+
else:
|
|
1980
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1981
|
+
@property
|
|
1982
|
+
def Contact(self):
|
|
1983
|
+
return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
|
|
1984
|
+
@Contact.setter
|
|
1985
|
+
def Contact(self, value):
|
|
1986
|
+
if isinstance(value, go.GoClass):
|
|
1987
|
+
_whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
|
|
1988
|
+
else:
|
|
1989
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1990
|
+
@property
|
|
1991
|
+
def Presence(self):
|
|
1992
|
+
return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
|
|
1993
|
+
@Presence.setter
|
|
1994
|
+
def Presence(self, value):
|
|
1995
|
+
if isinstance(value, go.GoClass):
|
|
1996
|
+
_whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
|
|
1997
|
+
else:
|
|
1998
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
1999
|
+
@property
|
|
2000
|
+
def Message(self):
|
|
2001
|
+
return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
|
|
2002
|
+
@Message.setter
|
|
2003
|
+
def Message(self, value):
|
|
2004
|
+
if isinstance(value, go.GoClass):
|
|
2005
|
+
_whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
|
|
2006
|
+
else:
|
|
2007
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2008
|
+
@property
|
|
2009
|
+
def ChatState(self):
|
|
2010
|
+
return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
|
|
2011
|
+
@ChatState.setter
|
|
2012
|
+
def ChatState(self, value):
|
|
2013
|
+
if isinstance(value, go.GoClass):
|
|
2014
|
+
_whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
|
|
2015
|
+
else:
|
|
2016
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2017
|
+
@property
|
|
2018
|
+
def Receipt(self):
|
|
2019
|
+
return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
|
|
2020
|
+
@Receipt.setter
|
|
2021
|
+
def Receipt(self, value):
|
|
2022
|
+
if isinstance(value, go.GoClass):
|
|
2023
|
+
_whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
|
|
2024
|
+
else:
|
|
2025
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2026
|
+
@property
|
|
2027
|
+
def Group(self):
|
|
2028
|
+
return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
|
|
2029
|
+
@Group.setter
|
|
2030
|
+
def Group(self, value):
|
|
2031
|
+
if isinstance(value, go.GoClass):
|
|
2032
|
+
_whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
|
|
2033
|
+
else:
|
|
2034
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2035
|
+
@property
|
|
2036
|
+
def Call(self):
|
|
2037
|
+
return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
|
|
2038
|
+
@Call.setter
|
|
2039
|
+
def Call(self, value):
|
|
2040
|
+
if isinstance(value, go.GoClass):
|
|
2041
|
+
_whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
|
|
2042
|
+
else:
|
|
2043
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
2038
2044
|
|
|
2039
|
-
# Python type for struct whatsapp.
|
|
2040
|
-
class
|
|
2041
|
-
"""A
|
|
2045
|
+
# Python type for struct whatsapp.Gateway
|
|
2046
|
+
class Gateway(go.GoClass):
|
|
2047
|
+
"""A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
|
|
2042
2048
|
def __init__(self, *args, **kwargs):
|
|
2043
2049
|
"""
|
|
2044
2050
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2052,33 +2058,29 @@ class Preview(go.GoClass):
|
|
|
2052
2058
|
self.handle = args[0].handle
|
|
2053
2059
|
_whatsapp.IncRef(self.handle)
|
|
2054
2060
|
else:
|
|
2055
|
-
self.handle = _whatsapp.
|
|
2061
|
+
self.handle = _whatsapp.whatsapp_Gateway_CTor()
|
|
2056
2062
|
_whatsapp.IncRef(self.handle)
|
|
2057
2063
|
if 0 < len(args):
|
|
2058
|
-
self.
|
|
2059
|
-
if "
|
|
2060
|
-
self.
|
|
2064
|
+
self.DBPath = args[0]
|
|
2065
|
+
if "DBPath" in kwargs:
|
|
2066
|
+
self.DBPath = kwargs["DBPath"]
|
|
2061
2067
|
if 1 < len(args):
|
|
2062
|
-
self.
|
|
2063
|
-
if "
|
|
2064
|
-
self.
|
|
2068
|
+
self.Name = args[1]
|
|
2069
|
+
if "Name" in kwargs:
|
|
2070
|
+
self.Name = kwargs["Name"]
|
|
2065
2071
|
if 2 < len(args):
|
|
2066
|
-
self.
|
|
2067
|
-
if "
|
|
2068
|
-
self.
|
|
2072
|
+
self.LogLevel = args[2]
|
|
2073
|
+
if "LogLevel" in kwargs:
|
|
2074
|
+
self.LogLevel = kwargs["LogLevel"]
|
|
2069
2075
|
if 3 < len(args):
|
|
2070
|
-
self.
|
|
2071
|
-
if "
|
|
2072
|
-
self.
|
|
2073
|
-
if 4 < len(args):
|
|
2074
|
-
self.Thumbnail = args[4]
|
|
2075
|
-
if "Thumbnail" in kwargs:
|
|
2076
|
-
self.Thumbnail = kwargs["Thumbnail"]
|
|
2076
|
+
self.TempDir = args[3]
|
|
2077
|
+
if "TempDir" in kwargs:
|
|
2078
|
+
self.TempDir = kwargs["TempDir"]
|
|
2077
2079
|
def __del__(self):
|
|
2078
2080
|
_whatsapp.DecRef(self.handle)
|
|
2079
2081
|
def __str__(self):
|
|
2080
2082
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2081
|
-
sv = 'whatsapp.
|
|
2083
|
+
sv = 'whatsapp.Gateway{'
|
|
2082
2084
|
first = True
|
|
2083
2085
|
for v in pr:
|
|
2084
2086
|
if callable(v[1]):
|
|
@@ -2091,60 +2093,72 @@ class Preview(go.GoClass):
|
|
|
2091
2093
|
return sv + '}'
|
|
2092
2094
|
def __repr__(self):
|
|
2093
2095
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2094
|
-
sv = 'whatsapp.
|
|
2096
|
+
sv = 'whatsapp.Gateway ( '
|
|
2095
2097
|
for v in pr:
|
|
2096
2098
|
if not callable(v[1]):
|
|
2097
2099
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2098
2100
|
return sv + ')'
|
|
2099
2101
|
@property
|
|
2100
|
-
def
|
|
2101
|
-
return _whatsapp.
|
|
2102
|
-
@
|
|
2103
|
-
def
|
|
2104
|
-
if isinstance(value, go.GoClass):
|
|
2105
|
-
_whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
|
|
2106
|
-
else:
|
|
2107
|
-
_whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
|
|
2108
|
-
@property
|
|
2109
|
-
def URL(self):
|
|
2110
|
-
return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
|
|
2111
|
-
@URL.setter
|
|
2112
|
-
def URL(self, value):
|
|
2102
|
+
def DBPath(self):
|
|
2103
|
+
return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
|
|
2104
|
+
@DBPath.setter
|
|
2105
|
+
def DBPath(self, value):
|
|
2113
2106
|
if isinstance(value, go.GoClass):
|
|
2114
|
-
_whatsapp.
|
|
2107
|
+
_whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
|
|
2115
2108
|
else:
|
|
2116
|
-
_whatsapp.
|
|
2109
|
+
_whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
|
|
2117
2110
|
@property
|
|
2118
|
-
def
|
|
2119
|
-
return _whatsapp.
|
|
2120
|
-
@
|
|
2121
|
-
def
|
|
2111
|
+
def Name(self):
|
|
2112
|
+
return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
|
|
2113
|
+
@Name.setter
|
|
2114
|
+
def Name(self, value):
|
|
2122
2115
|
if isinstance(value, go.GoClass):
|
|
2123
|
-
_whatsapp.
|
|
2116
|
+
_whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
|
|
2124
2117
|
else:
|
|
2125
|
-
_whatsapp.
|
|
2118
|
+
_whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
|
|
2126
2119
|
@property
|
|
2127
|
-
def
|
|
2128
|
-
return _whatsapp.
|
|
2129
|
-
@
|
|
2130
|
-
def
|
|
2120
|
+
def LogLevel(self):
|
|
2121
|
+
return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
|
|
2122
|
+
@LogLevel.setter
|
|
2123
|
+
def LogLevel(self, value):
|
|
2131
2124
|
if isinstance(value, go.GoClass):
|
|
2132
|
-
_whatsapp.
|
|
2125
|
+
_whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
|
|
2133
2126
|
else:
|
|
2134
|
-
_whatsapp.
|
|
2127
|
+
_whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
|
|
2135
2128
|
@property
|
|
2136
|
-
def
|
|
2137
|
-
return
|
|
2138
|
-
@
|
|
2139
|
-
def
|
|
2129
|
+
def TempDir(self):
|
|
2130
|
+
return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
|
|
2131
|
+
@TempDir.setter
|
|
2132
|
+
def TempDir(self, value):
|
|
2140
2133
|
if isinstance(value, go.GoClass):
|
|
2141
|
-
_whatsapp.
|
|
2134
|
+
_whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
|
|
2142
2135
|
else:
|
|
2143
|
-
|
|
2136
|
+
_whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
|
|
2137
|
+
def Init(self):
|
|
2138
|
+
"""Init() str
|
|
2139
|
+
|
|
2140
|
+
Init performs initialization procedures for the Gateway, and is expected to be run before any
|
|
2141
|
+
calls to [Gateway.Session].
|
|
2142
|
+
"""
|
|
2143
|
+
return _whatsapp.whatsapp_Gateway_Init(self.handle)
|
|
2144
|
+
def NewSession(self, device):
|
|
2145
|
+
"""NewSession(object device) object
|
|
2146
|
+
|
|
2147
|
+
NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
|
|
2148
|
+
a valid ID, a pair operation will be required, as described in [Session.Login].
|
|
2149
|
+
"""
|
|
2150
|
+
return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
|
|
2151
|
+
def CleanupSession(self, device):
|
|
2152
|
+
"""CleanupSession(object device) str
|
|
2153
|
+
|
|
2154
|
+
CleanupSession will remove all invalid and obsolete references to the given device, and should be
|
|
2155
|
+
used when pairing a new device or unregistering from the Gateway.
|
|
2156
|
+
"""
|
|
2157
|
+
return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
|
|
2144
2158
|
|
|
2145
|
-
# Python type for struct whatsapp.
|
|
2146
|
-
class
|
|
2147
|
-
"""A
|
|
2159
|
+
# Python type for struct whatsapp.GroupSubject
|
|
2160
|
+
class GroupSubject(go.GoClass):
|
|
2161
|
+
"""A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
|
|
2148
2162
|
def __init__(self, *args, **kwargs):
|
|
2149
2163
|
"""
|
|
2150
2164
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2158,13 +2172,25 @@ class Session(go.GoClass):
|
|
|
2158
2172
|
self.handle = args[0].handle
|
|
2159
2173
|
_whatsapp.IncRef(self.handle)
|
|
2160
2174
|
else:
|
|
2161
|
-
self.handle = _whatsapp.
|
|
2175
|
+
self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
|
|
2162
2176
|
_whatsapp.IncRef(self.handle)
|
|
2177
|
+
if 0 < len(args):
|
|
2178
|
+
self.Subject = args[0]
|
|
2179
|
+
if "Subject" in kwargs:
|
|
2180
|
+
self.Subject = kwargs["Subject"]
|
|
2181
|
+
if 1 < len(args):
|
|
2182
|
+
self.SetAt = args[1]
|
|
2183
|
+
if "SetAt" in kwargs:
|
|
2184
|
+
self.SetAt = kwargs["SetAt"]
|
|
2185
|
+
if 2 < len(args):
|
|
2186
|
+
self.SetBy = args[2]
|
|
2187
|
+
if "SetBy" in kwargs:
|
|
2188
|
+
self.SetBy = kwargs["SetBy"]
|
|
2163
2189
|
def __del__(self):
|
|
2164
2190
|
_whatsapp.DecRef(self.handle)
|
|
2165
2191
|
def __str__(self):
|
|
2166
2192
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2167
|
-
sv = 'whatsapp.
|
|
2193
|
+
sv = 'whatsapp.GroupSubject{'
|
|
2168
2194
|
first = True
|
|
2169
2195
|
for v in pr:
|
|
2170
2196
|
if callable(v[1]):
|
|
@@ -2177,167 +2203,42 @@ class Session(go.GoClass):
|
|
|
2177
2203
|
return sv + '}'
|
|
2178
2204
|
def __repr__(self):
|
|
2179
2205
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2180
|
-
sv = 'whatsapp.
|
|
2206
|
+
sv = 'whatsapp.GroupSubject ( '
|
|
2181
2207
|
for v in pr:
|
|
2182
2208
|
if not callable(v[1]):
|
|
2183
2209
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2184
2210
|
return sv + ')'
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
|
|
2213
|
-
def SendMessage(self, message):
|
|
2214
|
-
"""SendMessage(object message) str
|
|
2215
|
-
|
|
2216
|
-
SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
|
|
2217
|
-
specified within. In general, different message kinds require different fields to be set; see the
|
|
2218
|
-
documentation for the [Message] type for more information.
|
|
2219
|
-
"""
|
|
2220
|
-
return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
|
|
2221
|
-
def GenerateMessageID(self):
|
|
2222
|
-
"""GenerateMessageID() str
|
|
2223
|
-
|
|
2224
|
-
GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
|
|
2225
|
-
"""
|
|
2226
|
-
return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
|
|
2227
|
-
def SendChatState(self, state):
|
|
2228
|
-
"""SendChatState(object state) str
|
|
2229
|
-
|
|
2230
|
-
SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
|
|
2231
|
-
contact specified within.
|
|
2232
|
-
"""
|
|
2233
|
-
return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
|
|
2234
|
-
def SendReceipt(self, receipt):
|
|
2235
|
-
"""SendReceipt(object receipt) str
|
|
2236
|
-
|
|
2237
|
-
SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
|
|
2238
|
-
"""
|
|
2239
|
-
return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
|
|
2240
|
-
def SendPresence(self, presence, statusMessage):
|
|
2241
|
-
"""SendPresence(int presence, str statusMessage) str
|
|
2242
|
-
|
|
2243
|
-
SendPresence sets the activity state and (optional) status message for the current session and
|
|
2244
|
-
user. An error is returned if setting availability fails for any reason.
|
|
2245
|
-
"""
|
|
2246
|
-
return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
|
|
2247
|
-
def GetContacts(self, refresh):
|
|
2248
|
-
"""GetContacts(bool refresh) []object, str
|
|
2249
|
-
|
|
2250
|
-
GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
|
|
2251
|
-
If `refresh` is `true`, FetchRoster will pull application state from the remote service and
|
|
2252
|
-
synchronize any contacts found with the adapter.
|
|
2253
|
-
"""
|
|
2254
|
-
return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
|
|
2255
|
-
def GetGroups(self):
|
|
2256
|
-
"""GetGroups() []object, str
|
|
2257
|
-
|
|
2258
|
-
GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
|
|
2259
|
-
information on present participants.
|
|
2260
|
-
"""
|
|
2261
|
-
return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
|
|
2262
|
-
def CreateGroup(self, name, participants):
|
|
2263
|
-
"""CreateGroup(str name, []str participants) object, str
|
|
2264
|
-
|
|
2265
|
-
CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
|
|
2266
|
-
participant JIDs given.
|
|
2267
|
-
"""
|
|
2268
|
-
return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
|
|
2269
|
-
def LeaveGroup(self, resourceID):
|
|
2270
|
-
"""LeaveGroup(str resourceID) str
|
|
2271
|
-
|
|
2272
|
-
LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
|
|
2273
|
-
"""
|
|
2274
|
-
return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
|
|
2275
|
-
def GetAvatar(self, resourceID, avatarID):
|
|
2276
|
-
"""GetAvatar(str resourceID, str avatarID) object, str
|
|
2277
|
-
|
|
2278
|
-
GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
|
|
2279
|
-
is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
|
|
2280
|
-
for the given ID has not changed.
|
|
2281
|
-
"""
|
|
2282
|
-
return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
|
|
2283
|
-
def SetAvatar(self, resourceID, avatar):
|
|
2284
|
-
"""SetAvatar(str resourceID, []int avatar) str, str
|
|
2285
|
-
|
|
2286
|
-
SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
|
|
2287
|
-
profile picture for our own user by providing an empty JID. The unique picture ID is returned,
|
|
2288
|
-
typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
|
|
2289
|
-
"""
|
|
2290
|
-
return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
|
|
2291
|
-
def SetGroupName(self, resourceID, name):
|
|
2292
|
-
"""SetGroupName(str resourceID, str name) str
|
|
2293
|
-
|
|
2294
|
-
SetGroupName updates the name of a WhatsApp group for the Group JID given.
|
|
2295
|
-
"""
|
|
2296
|
-
return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
|
|
2297
|
-
def SetGroupTopic(self, resourceID, topic):
|
|
2298
|
-
"""SetGroupTopic(str resourceID, str topic) str
|
|
2299
|
-
|
|
2300
|
-
SetGroupName updates the topic of a WhatsApp group for the Group JID given.
|
|
2301
|
-
"""
|
|
2302
|
-
return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
|
|
2303
|
-
def UpdateGroupParticipants(self, resourceID, participants):
|
|
2304
|
-
"""UpdateGroupParticipants(str resourceID, []object participants) []object, str
|
|
2305
|
-
|
|
2306
|
-
UpdateGroupParticipants processes changes to the given group's participants, including additions,
|
|
2307
|
-
removals, and changes to privileges. Participant JIDs given must be part of the authenticated
|
|
2308
|
-
session's roster at least, and must also be active group participants for other types of changes.
|
|
2309
|
-
"""
|
|
2310
|
-
return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
|
|
2311
|
-
def FindContact(self, phone):
|
|
2312
|
-
"""FindContact(str phone) object, str
|
|
2313
|
-
|
|
2314
|
-
FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
|
|
2315
|
-
phone number, returning a concrete instance if found; typically, only the contact JID is set. No
|
|
2316
|
-
error is returned if no contact was found, but any unexpected errors will otherwise be returned
|
|
2317
|
-
directly.
|
|
2318
|
-
"""
|
|
2319
|
-
return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
|
|
2320
|
-
def RequestMessageHistory(self, resourceID, oldestMessage):
|
|
2321
|
-
"""RequestMessageHistory(str resourceID, object oldestMessage) str
|
|
2322
|
-
|
|
2323
|
-
RequestMessageHistory sends and asynchronous request for message history related to the given
|
|
2324
|
-
resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
|
|
2325
|
-
history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
|
|
2326
|
-
event handler. An error will be returned if requesting history fails for any reason.
|
|
2327
|
-
"""
|
|
2328
|
-
return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
|
|
2329
|
-
def SetEventHandler(self, h, goRun=False):
|
|
2330
|
-
"""SetEventHandler(callable h)
|
|
2331
|
-
|
|
2332
|
-
SetEventHandler assigns the given handler function for propagating internal events into the Python
|
|
2333
|
-
gateway. Note that the event handler function is not entirely safe to use directly, and all calls
|
|
2334
|
-
should instead be sent to the [Gateway] via its internal call channel.
|
|
2335
|
-
"""
|
|
2336
|
-
_whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
|
|
2211
|
+
@property
|
|
2212
|
+
def Subject(self):
|
|
2213
|
+
return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
|
|
2214
|
+
@Subject.setter
|
|
2215
|
+
def Subject(self, value):
|
|
2216
|
+
if isinstance(value, go.GoClass):
|
|
2217
|
+
_whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
|
|
2218
|
+
else:
|
|
2219
|
+
_whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
|
|
2220
|
+
@property
|
|
2221
|
+
def SetAt(self):
|
|
2222
|
+
return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
|
|
2223
|
+
@SetAt.setter
|
|
2224
|
+
def SetAt(self, value):
|
|
2225
|
+
if isinstance(value, go.GoClass):
|
|
2226
|
+
_whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
|
|
2227
|
+
else:
|
|
2228
|
+
_whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
|
|
2229
|
+
@property
|
|
2230
|
+
def SetBy(self):
|
|
2231
|
+
return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
|
|
2232
|
+
@SetBy.setter
|
|
2233
|
+
def SetBy(self, value):
|
|
2234
|
+
if isinstance(value, go.GoClass):
|
|
2235
|
+
_whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
|
|
2236
|
+
else:
|
|
2237
|
+
_whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
|
|
2337
2238
|
|
|
2338
|
-
# Python type for struct whatsapp.
|
|
2339
|
-
class
|
|
2340
|
-
"""A
|
|
2239
|
+
# Python type for struct whatsapp.Message
|
|
2240
|
+
class Message(go.GoClass):
|
|
2241
|
+
"""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"""
|
|
2341
2242
|
def __init__(self, *args, **kwargs):
|
|
2342
2243
|
"""
|
|
2343
2244
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2351,145 +2252,14 @@ class Avatar(go.GoClass):
|
|
|
2351
2252
|
self.handle = args[0].handle
|
|
2352
2253
|
_whatsapp.IncRef(self.handle)
|
|
2353
2254
|
else:
|
|
2354
|
-
self.handle = _whatsapp.
|
|
2255
|
+
self.handle = _whatsapp.whatsapp_Message_CTor()
|
|
2355
2256
|
_whatsapp.IncRef(self.handle)
|
|
2356
2257
|
if 0 < len(args):
|
|
2357
|
-
self.
|
|
2358
|
-
if "
|
|
2359
|
-
self.
|
|
2360
|
-
if 1 < len(args):
|
|
2361
|
-
self.
|
|
2362
|
-
if "URL" in kwargs:
|
|
2363
|
-
self.URL = kwargs["URL"]
|
|
2364
|
-
def __del__(self):
|
|
2365
|
-
_whatsapp.DecRef(self.handle)
|
|
2366
|
-
def __str__(self):
|
|
2367
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2368
|
-
sv = 'whatsapp.Avatar{'
|
|
2369
|
-
first = True
|
|
2370
|
-
for v in pr:
|
|
2371
|
-
if callable(v[1]):
|
|
2372
|
-
continue
|
|
2373
|
-
if first:
|
|
2374
|
-
first = False
|
|
2375
|
-
else:
|
|
2376
|
-
sv += ', '
|
|
2377
|
-
sv += v[0] + '=' + str(v[1])
|
|
2378
|
-
return sv + '}'
|
|
2379
|
-
def __repr__(self):
|
|
2380
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2381
|
-
sv = 'whatsapp.Avatar ( '
|
|
2382
|
-
for v in pr:
|
|
2383
|
-
if not callable(v[1]):
|
|
2384
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2385
|
-
return sv + ')'
|
|
2386
|
-
@property
|
|
2387
|
-
def ID(self):
|
|
2388
|
-
return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
|
|
2389
|
-
@ID.setter
|
|
2390
|
-
def ID(self, value):
|
|
2391
|
-
if isinstance(value, go.GoClass):
|
|
2392
|
-
_whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
|
|
2393
|
-
else:
|
|
2394
|
-
_whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
|
|
2395
|
-
@property
|
|
2396
|
-
def URL(self):
|
|
2397
|
-
return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
|
|
2398
|
-
@URL.setter
|
|
2399
|
-
def URL(self, value):
|
|
2400
|
-
if isinstance(value, go.GoClass):
|
|
2401
|
-
_whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
|
|
2402
|
-
else:
|
|
2403
|
-
_whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
|
|
2404
|
-
|
|
2405
|
-
# Python type for struct whatsapp.LinkedDevice
|
|
2406
|
-
class LinkedDevice(go.GoClass):
|
|
2407
|
-
"""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"""
|
|
2408
|
-
def __init__(self, *args, **kwargs):
|
|
2409
|
-
"""
|
|
2410
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2411
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
|
2412
|
-
in which case a new Go object is constructed first
|
|
2413
|
-
"""
|
|
2414
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2415
|
-
self.handle = kwargs['handle']
|
|
2416
|
-
_whatsapp.IncRef(self.handle)
|
|
2417
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
2418
|
-
self.handle = args[0].handle
|
|
2419
|
-
_whatsapp.IncRef(self.handle)
|
|
2420
|
-
else:
|
|
2421
|
-
self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
|
|
2422
|
-
_whatsapp.IncRef(self.handle)
|
|
2423
|
-
if 0 < len(args):
|
|
2424
|
-
self.ID = args[0]
|
|
2425
|
-
if "ID" in kwargs:
|
|
2426
|
-
self.ID = kwargs["ID"]
|
|
2427
|
-
def __del__(self):
|
|
2428
|
-
_whatsapp.DecRef(self.handle)
|
|
2429
|
-
def __str__(self):
|
|
2430
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2431
|
-
sv = 'whatsapp.LinkedDevice{'
|
|
2432
|
-
first = True
|
|
2433
|
-
for v in pr:
|
|
2434
|
-
if callable(v[1]):
|
|
2435
|
-
continue
|
|
2436
|
-
if first:
|
|
2437
|
-
first = False
|
|
2438
|
-
else:
|
|
2439
|
-
sv += ', '
|
|
2440
|
-
sv += v[0] + '=' + str(v[1])
|
|
2441
|
-
return sv + '}'
|
|
2442
|
-
def __repr__(self):
|
|
2443
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2444
|
-
sv = 'whatsapp.LinkedDevice ( '
|
|
2445
|
-
for v in pr:
|
|
2446
|
-
if not callable(v[1]):
|
|
2447
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2448
|
-
return sv + ')'
|
|
2449
|
-
@property
|
|
2450
|
-
def ID(self):
|
|
2451
|
-
"""ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
|
|
2452
|
-
is currently equivalent to a password, and needs to be protected accordingly.
|
|
2453
|
-
"""
|
|
2454
|
-
return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
|
|
2455
|
-
@ID.setter
|
|
2456
|
-
def ID(self, value):
|
|
2457
|
-
if isinstance(value, go.GoClass):
|
|
2458
|
-
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
|
|
2459
|
-
else:
|
|
2460
|
-
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
|
|
2461
|
-
def JID(self):
|
|
2462
|
-
"""JID() object
|
|
2463
|
-
|
|
2464
|
-
JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
|
|
2465
|
-
may return invalid JIDs, and this function does not handle errors.
|
|
2466
|
-
"""
|
|
2467
|
-
return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
|
|
2468
|
-
|
|
2469
|
-
# Python type for struct whatsapp.Message
|
|
2470
|
-
class Message(go.GoClass):
|
|
2471
|
-
"""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"""
|
|
2472
|
-
def __init__(self, *args, **kwargs):
|
|
2473
|
-
"""
|
|
2474
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
2475
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
|
2476
|
-
in which case a new Go object is constructed first
|
|
2477
|
-
"""
|
|
2478
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
2479
|
-
self.handle = kwargs['handle']
|
|
2480
|
-
_whatsapp.IncRef(self.handle)
|
|
2481
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
2482
|
-
self.handle = args[0].handle
|
|
2483
|
-
_whatsapp.IncRef(self.handle)
|
|
2484
|
-
else:
|
|
2485
|
-
self.handle = _whatsapp.whatsapp_Message_CTor()
|
|
2486
|
-
_whatsapp.IncRef(self.handle)
|
|
2487
|
-
if 0 < len(args):
|
|
2488
|
-
self.Kind = args[0]
|
|
2489
|
-
if "Kind" in kwargs:
|
|
2490
|
-
self.Kind = kwargs["Kind"]
|
|
2491
|
-
if 1 < len(args):
|
|
2492
|
-
self.ID = args[1]
|
|
2258
|
+
self.Kind = args[0]
|
|
2259
|
+
if "Kind" in kwargs:
|
|
2260
|
+
self.Kind = kwargs["Kind"]
|
|
2261
|
+
if 1 < len(args):
|
|
2262
|
+
self.ID = args[1]
|
|
2493
2263
|
if "ID" in kwargs:
|
|
2494
2264
|
self.ID = kwargs["ID"]
|
|
2495
2265
|
if 2 < len(args):
|
|
@@ -2834,9 +2604,9 @@ class PollOption(go.GoClass):
|
|
|
2834
2604
|
else:
|
|
2835
2605
|
_whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
|
|
2836
2606
|
|
|
2837
|
-
# Python type for struct whatsapp.
|
|
2838
|
-
class
|
|
2839
|
-
"""A
|
|
2607
|
+
# Python type for struct whatsapp.Album
|
|
2608
|
+
class Album(go.GoClass):
|
|
2609
|
+
"""A Album message represents a collection of media files, typically images and videos.\n"""
|
|
2840
2610
|
def __init__(self, *args, **kwargs):
|
|
2841
2611
|
"""
|
|
2842
2612
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2850,29 +2620,25 @@ class Attachment(go.GoClass):
|
|
|
2850
2620
|
self.handle = args[0].handle
|
|
2851
2621
|
_whatsapp.IncRef(self.handle)
|
|
2852
2622
|
else:
|
|
2853
|
-
self.handle = _whatsapp.
|
|
2623
|
+
self.handle = _whatsapp.whatsapp_Album_CTor()
|
|
2854
2624
|
_whatsapp.IncRef(self.handle)
|
|
2855
2625
|
if 0 < len(args):
|
|
2856
|
-
self.
|
|
2857
|
-
if "
|
|
2858
|
-
self.
|
|
2626
|
+
self.IsAlbum = args[0]
|
|
2627
|
+
if "IsAlbum" in kwargs:
|
|
2628
|
+
self.IsAlbum = kwargs["IsAlbum"]
|
|
2859
2629
|
if 1 < len(args):
|
|
2860
|
-
self.
|
|
2861
|
-
if "
|
|
2862
|
-
self.
|
|
2630
|
+
self.ImageCount = args[1]
|
|
2631
|
+
if "ImageCount" in kwargs:
|
|
2632
|
+
self.ImageCount = kwargs["ImageCount"]
|
|
2863
2633
|
if 2 < len(args):
|
|
2864
|
-
self.
|
|
2865
|
-
if "
|
|
2866
|
-
self.
|
|
2867
|
-
if 3 < len(args):
|
|
2868
|
-
self.Data = args[3]
|
|
2869
|
-
if "Data" in kwargs:
|
|
2870
|
-
self.Data = kwargs["Data"]
|
|
2634
|
+
self.VideoCount = args[2]
|
|
2635
|
+
if "VideoCount" in kwargs:
|
|
2636
|
+
self.VideoCount = kwargs["VideoCount"]
|
|
2871
2637
|
def __del__(self):
|
|
2872
2638
|
_whatsapp.DecRef(self.handle)
|
|
2873
2639
|
def __str__(self):
|
|
2874
2640
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2875
|
-
sv = 'whatsapp.
|
|
2641
|
+
sv = 'whatsapp.Album{'
|
|
2876
2642
|
first = True
|
|
2877
2643
|
for v in pr:
|
|
2878
2644
|
if callable(v[1]):
|
|
@@ -2885,57 +2651,42 @@ class Attachment(go.GoClass):
|
|
|
2885
2651
|
return sv + '}'
|
|
2886
2652
|
def __repr__(self):
|
|
2887
2653
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2888
|
-
sv = 'whatsapp.
|
|
2654
|
+
sv = 'whatsapp.Album ( '
|
|
2889
2655
|
for v in pr:
|
|
2890
2656
|
if not callable(v[1]):
|
|
2891
2657
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2892
2658
|
return sv + ')'
|
|
2893
2659
|
@property
|
|
2894
|
-
def
|
|
2895
|
-
return _whatsapp.
|
|
2896
|
-
@
|
|
2897
|
-
def
|
|
2898
|
-
if isinstance(value, go.GoClass):
|
|
2899
|
-
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
|
|
2900
|
-
else:
|
|
2901
|
-
_whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
|
|
2902
|
-
@property
|
|
2903
|
-
def Filename(self):
|
|
2904
|
-
return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
|
|
2905
|
-
@Filename.setter
|
|
2906
|
-
def Filename(self, value):
|
|
2660
|
+
def IsAlbum(self):
|
|
2661
|
+
return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
|
|
2662
|
+
@IsAlbum.setter
|
|
2663
|
+
def IsAlbum(self, value):
|
|
2907
2664
|
if isinstance(value, go.GoClass):
|
|
2908
|
-
_whatsapp.
|
|
2665
|
+
_whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
|
|
2909
2666
|
else:
|
|
2910
|
-
_whatsapp.
|
|
2667
|
+
_whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
|
|
2911
2668
|
@property
|
|
2912
|
-
def
|
|
2913
|
-
return _whatsapp.
|
|
2914
|
-
@
|
|
2915
|
-
def
|
|
2669
|
+
def ImageCount(self):
|
|
2670
|
+
return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
|
|
2671
|
+
@ImageCount.setter
|
|
2672
|
+
def ImageCount(self, value):
|
|
2916
2673
|
if isinstance(value, go.GoClass):
|
|
2917
|
-
_whatsapp.
|
|
2674
|
+
_whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
|
|
2918
2675
|
else:
|
|
2919
|
-
_whatsapp.
|
|
2676
|
+
_whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
|
|
2920
2677
|
@property
|
|
2921
|
-
def
|
|
2922
|
-
return
|
|
2923
|
-
@
|
|
2924
|
-
def
|
|
2678
|
+
def VideoCount(self):
|
|
2679
|
+
return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
|
|
2680
|
+
@VideoCount.setter
|
|
2681
|
+
def VideoCount(self, value):
|
|
2925
2682
|
if isinstance(value, go.GoClass):
|
|
2926
|
-
_whatsapp.
|
|
2683
|
+
_whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
|
|
2927
2684
|
else:
|
|
2928
|
-
|
|
2929
|
-
def GetSpec(self, ctx):
|
|
2930
|
-
"""GetSpec(object ctx) object, str
|
|
2931
|
-
|
|
2932
|
-
GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
|
|
2933
|
-
"""
|
|
2934
|
-
return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
|
|
2685
|
+
_whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
|
|
2935
2686
|
|
|
2936
|
-
# Python type for struct whatsapp.
|
|
2937
|
-
class
|
|
2938
|
-
"""
|
|
2687
|
+
# Python type for struct whatsapp.Avatar
|
|
2688
|
+
class Avatar(go.GoClass):
|
|
2689
|
+
"""A Avatar represents a small image set for a Contact or Group.\n"""
|
|
2939
2690
|
def __init__(self, *args, **kwargs):
|
|
2940
2691
|
"""
|
|
2941
2692
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -2949,21 +2700,21 @@ class Connect(go.GoClass):
|
|
|
2949
2700
|
self.handle = args[0].handle
|
|
2950
2701
|
_whatsapp.IncRef(self.handle)
|
|
2951
2702
|
else:
|
|
2952
|
-
self.handle = _whatsapp.
|
|
2703
|
+
self.handle = _whatsapp.whatsapp_Avatar_CTor()
|
|
2953
2704
|
_whatsapp.IncRef(self.handle)
|
|
2954
2705
|
if 0 < len(args):
|
|
2955
|
-
self.
|
|
2956
|
-
if "
|
|
2957
|
-
self.
|
|
2706
|
+
self.ID = args[0]
|
|
2707
|
+
if "ID" in kwargs:
|
|
2708
|
+
self.ID = kwargs["ID"]
|
|
2958
2709
|
if 1 < len(args):
|
|
2959
|
-
self.
|
|
2960
|
-
if "
|
|
2961
|
-
self.
|
|
2710
|
+
self.URL = args[1]
|
|
2711
|
+
if "URL" in kwargs:
|
|
2712
|
+
self.URL = kwargs["URL"]
|
|
2962
2713
|
def __del__(self):
|
|
2963
2714
|
_whatsapp.DecRef(self.handle)
|
|
2964
2715
|
def __str__(self):
|
|
2965
2716
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2966
|
-
sv = 'whatsapp.
|
|
2717
|
+
sv = 'whatsapp.Avatar{'
|
|
2967
2718
|
first = True
|
|
2968
2719
|
for v in pr:
|
|
2969
2720
|
if callable(v[1]):
|
|
@@ -2976,35 +2727,35 @@ class Connect(go.GoClass):
|
|
|
2976
2727
|
return sv + '}'
|
|
2977
2728
|
def __repr__(self):
|
|
2978
2729
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
2979
|
-
sv = 'whatsapp.
|
|
2730
|
+
sv = 'whatsapp.Avatar ( '
|
|
2980
2731
|
for v in pr:
|
|
2981
2732
|
if not callable(v[1]):
|
|
2982
2733
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
2983
2734
|
return sv + ')'
|
|
2984
2735
|
@property
|
|
2985
|
-
def
|
|
2986
|
-
return _whatsapp.
|
|
2987
|
-
@
|
|
2988
|
-
def
|
|
2736
|
+
def ID(self):
|
|
2737
|
+
return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
|
|
2738
|
+
@ID.setter
|
|
2739
|
+
def ID(self, value):
|
|
2989
2740
|
if isinstance(value, go.GoClass):
|
|
2990
|
-
_whatsapp.
|
|
2741
|
+
_whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
|
|
2991
2742
|
else:
|
|
2992
|
-
_whatsapp.
|
|
2743
|
+
_whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
|
|
2993
2744
|
@property
|
|
2994
|
-
def
|
|
2995
|
-
return _whatsapp.
|
|
2996
|
-
@
|
|
2997
|
-
def
|
|
2745
|
+
def URL(self):
|
|
2746
|
+
return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
|
|
2747
|
+
@URL.setter
|
|
2748
|
+
def URL(self, value):
|
|
2998
2749
|
if isinstance(value, go.GoClass):
|
|
2999
|
-
_whatsapp.
|
|
2750
|
+
_whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
|
|
3000
2751
|
else:
|
|
3001
|
-
_whatsapp.
|
|
2752
|
+
_whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
|
|
3002
2753
|
|
|
3003
|
-
# Python type for struct whatsapp.
|
|
3004
|
-
class
|
|
3005
|
-
"""A
|
|
3006
|
-
def __init__(self, *args, **kwargs):
|
|
3007
|
-
"""
|
|
2754
|
+
# Python type for struct whatsapp.ChatState
|
|
2755
|
+
class ChatState(go.GoClass):
|
|
2756
|
+
"""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"""
|
|
2757
|
+
def __init__(self, *args, **kwargs):
|
|
2758
|
+
"""
|
|
3008
2759
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3009
2760
|
otherwise parameters can be unnamed in order of field names or named fields
|
|
3010
2761
|
in which case a new Go object is constructed first
|
|
@@ -3016,29 +2767,25 @@ class Gateway(go.GoClass):
|
|
|
3016
2767
|
self.handle = args[0].handle
|
|
3017
2768
|
_whatsapp.IncRef(self.handle)
|
|
3018
2769
|
else:
|
|
3019
|
-
self.handle = _whatsapp.
|
|
2770
|
+
self.handle = _whatsapp.whatsapp_ChatState_CTor()
|
|
3020
2771
|
_whatsapp.IncRef(self.handle)
|
|
3021
2772
|
if 0 < len(args):
|
|
3022
|
-
self.
|
|
3023
|
-
if "
|
|
3024
|
-
self.
|
|
2773
|
+
self.Kind = args[0]
|
|
2774
|
+
if "Kind" in kwargs:
|
|
2775
|
+
self.Kind = kwargs["Kind"]
|
|
3025
2776
|
if 1 < len(args):
|
|
3026
|
-
self.
|
|
3027
|
-
if "
|
|
3028
|
-
self.
|
|
2777
|
+
self.JID = args[1]
|
|
2778
|
+
if "JID" in kwargs:
|
|
2779
|
+
self.JID = kwargs["JID"]
|
|
3029
2780
|
if 2 < len(args):
|
|
3030
|
-
self.
|
|
3031
|
-
if "
|
|
3032
|
-
self.
|
|
3033
|
-
if 3 < len(args):
|
|
3034
|
-
self.TempDir = args[3]
|
|
3035
|
-
if "TempDir" in kwargs:
|
|
3036
|
-
self.TempDir = kwargs["TempDir"]
|
|
2781
|
+
self.GroupJID = args[2]
|
|
2782
|
+
if "GroupJID" in kwargs:
|
|
2783
|
+
self.GroupJID = kwargs["GroupJID"]
|
|
3037
2784
|
def __del__(self):
|
|
3038
2785
|
_whatsapp.DecRef(self.handle)
|
|
3039
2786
|
def __str__(self):
|
|
3040
2787
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3041
|
-
sv = 'whatsapp.
|
|
2788
|
+
sv = 'whatsapp.ChatState{'
|
|
3042
2789
|
first = True
|
|
3043
2790
|
for v in pr:
|
|
3044
2791
|
if callable(v[1]):
|
|
@@ -3051,68 +2798,38 @@ class Gateway(go.GoClass):
|
|
|
3051
2798
|
return sv + '}'
|
|
3052
2799
|
def __repr__(self):
|
|
3053
2800
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3054
|
-
sv = 'whatsapp.
|
|
2801
|
+
sv = 'whatsapp.ChatState ( '
|
|
3055
2802
|
for v in pr:
|
|
3056
2803
|
if not callable(v[1]):
|
|
3057
2804
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
3058
2805
|
return sv + ')'
|
|
3059
2806
|
@property
|
|
3060
|
-
def
|
|
3061
|
-
return _whatsapp.
|
|
3062
|
-
@
|
|
3063
|
-
def
|
|
3064
|
-
if isinstance(value, go.GoClass):
|
|
3065
|
-
_whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
|
|
3066
|
-
else:
|
|
3067
|
-
_whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
|
|
3068
|
-
@property
|
|
3069
|
-
def Name(self):
|
|
3070
|
-
return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
|
|
3071
|
-
@Name.setter
|
|
3072
|
-
def Name(self, value):
|
|
2807
|
+
def Kind(self):
|
|
2808
|
+
return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
|
|
2809
|
+
@Kind.setter
|
|
2810
|
+
def Kind(self, value):
|
|
3073
2811
|
if isinstance(value, go.GoClass):
|
|
3074
|
-
_whatsapp.
|
|
2812
|
+
_whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
|
|
3075
2813
|
else:
|
|
3076
|
-
_whatsapp.
|
|
2814
|
+
_whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
|
|
3077
2815
|
@property
|
|
3078
|
-
def
|
|
3079
|
-
return _whatsapp.
|
|
3080
|
-
@
|
|
3081
|
-
def
|
|
2816
|
+
def JID(self):
|
|
2817
|
+
return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
|
|
2818
|
+
@JID.setter
|
|
2819
|
+
def JID(self, value):
|
|
3082
2820
|
if isinstance(value, go.GoClass):
|
|
3083
|
-
_whatsapp.
|
|
2821
|
+
_whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
|
|
3084
2822
|
else:
|
|
3085
|
-
_whatsapp.
|
|
2823
|
+
_whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
|
|
3086
2824
|
@property
|
|
3087
|
-
def
|
|
3088
|
-
return _whatsapp.
|
|
3089
|
-
@
|
|
3090
|
-
def
|
|
2825
|
+
def GroupJID(self):
|
|
2826
|
+
return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
|
|
2827
|
+
@GroupJID.setter
|
|
2828
|
+
def GroupJID(self, value):
|
|
3091
2829
|
if isinstance(value, go.GoClass):
|
|
3092
|
-
_whatsapp.
|
|
2830
|
+
_whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
|
|
3093
2831
|
else:
|
|
3094
|
-
_whatsapp.
|
|
3095
|
-
def Init(self):
|
|
3096
|
-
"""Init() str
|
|
3097
|
-
|
|
3098
|
-
Init performs initialization procedures for the Gateway, and is expected to be run before any
|
|
3099
|
-
calls to [Gateway.Session].
|
|
3100
|
-
"""
|
|
3101
|
-
return _whatsapp.whatsapp_Gateway_Init(self.handle)
|
|
3102
|
-
def NewSession(self, device):
|
|
3103
|
-
"""NewSession(object device) object
|
|
3104
|
-
|
|
3105
|
-
NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
|
|
3106
|
-
a valid ID, a pair operation will be required, as described in [Session.Login].
|
|
3107
|
-
"""
|
|
3108
|
-
return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
|
|
3109
|
-
def CleanupSession(self, device):
|
|
3110
|
-
"""CleanupSession(object device) str
|
|
3111
|
-
|
|
3112
|
-
CleanupSession will remove all invalid and obsolete references to the given device, and should be
|
|
3113
|
-
used when pairing a new device or unregistering from the Gateway.
|
|
3114
|
-
"""
|
|
3115
|
-
return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
|
|
2832
|
+
_whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
|
|
3116
2833
|
|
|
3117
2834
|
# Python type for struct whatsapp.Location
|
|
3118
2835
|
class Location(go.GoClass):
|
|
@@ -3248,9 +2965,9 @@ class Location(go.GoClass):
|
|
|
3248
2965
|
else:
|
|
3249
2966
|
_whatsapp.whatsapp_Location_URL_Set(self.handle, value)
|
|
3250
2967
|
|
|
3251
|
-
# Python type for struct whatsapp.
|
|
3252
|
-
class
|
|
3253
|
-
"""
|
|
2968
|
+
# Python type for struct whatsapp.LinkedDevice
|
|
2969
|
+
class LinkedDevice(go.GoClass):
|
|
2970
|
+
"""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"""
|
|
3254
2971
|
def __init__(self, *args, **kwargs):
|
|
3255
2972
|
"""
|
|
3256
2973
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
@@ -3264,25 +2981,17 @@ class Presence(go.GoClass):
|
|
|
3264
2981
|
self.handle = args[0].handle
|
|
3265
2982
|
_whatsapp.IncRef(self.handle)
|
|
3266
2983
|
else:
|
|
3267
|
-
self.handle = _whatsapp.
|
|
2984
|
+
self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
|
|
3268
2985
|
_whatsapp.IncRef(self.handle)
|
|
3269
2986
|
if 0 < len(args):
|
|
3270
|
-
self.
|
|
3271
|
-
if "
|
|
3272
|
-
self.
|
|
3273
|
-
if 1 < len(args):
|
|
3274
|
-
self.Kind = args[1]
|
|
3275
|
-
if "Kind" in kwargs:
|
|
3276
|
-
self.Kind = kwargs["Kind"]
|
|
3277
|
-
if 2 < len(args):
|
|
3278
|
-
self.LastSeen = args[2]
|
|
3279
|
-
if "LastSeen" in kwargs:
|
|
3280
|
-
self.LastSeen = kwargs["LastSeen"]
|
|
2987
|
+
self.ID = args[0]
|
|
2988
|
+
if "ID" in kwargs:
|
|
2989
|
+
self.ID = kwargs["ID"]
|
|
3281
2990
|
def __del__(self):
|
|
3282
2991
|
_whatsapp.DecRef(self.handle)
|
|
3283
2992
|
def __str__(self):
|
|
3284
2993
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3285
|
-
sv = 'whatsapp.
|
|
2994
|
+
sv = 'whatsapp.LinkedDevice{'
|
|
3286
2995
|
first = True
|
|
3287
2996
|
for v in pr:
|
|
3288
2997
|
if callable(v[1]):
|
|
@@ -3295,38 +3004,329 @@ class Presence(go.GoClass):
|
|
|
3295
3004
|
return sv + '}'
|
|
3296
3005
|
def __repr__(self):
|
|
3297
3006
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3298
|
-
sv = 'whatsapp.
|
|
3007
|
+
sv = 'whatsapp.LinkedDevice ( '
|
|
3299
3008
|
for v in pr:
|
|
3300
3009
|
if not callable(v[1]):
|
|
3301
3010
|
sv += v[0] + '=' + str(v[1]) + ', '
|
|
3302
3011
|
return sv + ')'
|
|
3303
3012
|
@property
|
|
3304
|
-
def
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3013
|
+
def ID(self):
|
|
3014
|
+
"""ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
|
|
3015
|
+
is currently equivalent to a password, and needs to be protected accordingly.
|
|
3016
|
+
"""
|
|
3017
|
+
return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
|
|
3018
|
+
@ID.setter
|
|
3019
|
+
def ID(self, value):
|
|
3308
3020
|
if isinstance(value, go.GoClass):
|
|
3309
|
-
_whatsapp.
|
|
3021
|
+
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
|
|
3310
3022
|
else:
|
|
3311
|
-
_whatsapp.
|
|
3023
|
+
_whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
|
|
3024
|
+
def JID(self):
|
|
3025
|
+
"""JID() object
|
|
3026
|
+
|
|
3027
|
+
JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
|
|
3028
|
+
may return invalid JIDs, and this function does not handle errors.
|
|
3029
|
+
"""
|
|
3030
|
+
return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
|
|
3031
|
+
|
|
3032
|
+
# Python type for struct whatsapp.Preview
|
|
3033
|
+
class Preview(go.GoClass):
|
|
3034
|
+
"""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"""
|
|
3035
|
+
def __init__(self, *args, **kwargs):
|
|
3036
|
+
"""
|
|
3037
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3038
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
|
3039
|
+
in which case a new Go object is constructed first
|
|
3040
|
+
"""
|
|
3041
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3042
|
+
self.handle = kwargs['handle']
|
|
3043
|
+
_whatsapp.IncRef(self.handle)
|
|
3044
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
3045
|
+
self.handle = args[0].handle
|
|
3046
|
+
_whatsapp.IncRef(self.handle)
|
|
3047
|
+
else:
|
|
3048
|
+
self.handle = _whatsapp.whatsapp_Preview_CTor()
|
|
3049
|
+
_whatsapp.IncRef(self.handle)
|
|
3050
|
+
if 0 < len(args):
|
|
3051
|
+
self.Kind = args[0]
|
|
3052
|
+
if "Kind" in kwargs:
|
|
3053
|
+
self.Kind = kwargs["Kind"]
|
|
3054
|
+
if 1 < len(args):
|
|
3055
|
+
self.URL = args[1]
|
|
3056
|
+
if "URL" in kwargs:
|
|
3057
|
+
self.URL = kwargs["URL"]
|
|
3058
|
+
if 2 < len(args):
|
|
3059
|
+
self.Title = args[2]
|
|
3060
|
+
if "Title" in kwargs:
|
|
3061
|
+
self.Title = kwargs["Title"]
|
|
3062
|
+
if 3 < len(args):
|
|
3063
|
+
self.Description = args[3]
|
|
3064
|
+
if "Description" in kwargs:
|
|
3065
|
+
self.Description = kwargs["Description"]
|
|
3066
|
+
if 4 < len(args):
|
|
3067
|
+
self.Thumbnail = args[4]
|
|
3068
|
+
if "Thumbnail" in kwargs:
|
|
3069
|
+
self.Thumbnail = kwargs["Thumbnail"]
|
|
3070
|
+
def __del__(self):
|
|
3071
|
+
_whatsapp.DecRef(self.handle)
|
|
3072
|
+
def __str__(self):
|
|
3073
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3074
|
+
sv = 'whatsapp.Preview{'
|
|
3075
|
+
first = True
|
|
3076
|
+
for v in pr:
|
|
3077
|
+
if callable(v[1]):
|
|
3078
|
+
continue
|
|
3079
|
+
if first:
|
|
3080
|
+
first = False
|
|
3081
|
+
else:
|
|
3082
|
+
sv += ', '
|
|
3083
|
+
sv += v[0] + '=' + str(v[1])
|
|
3084
|
+
return sv + '}'
|
|
3085
|
+
def __repr__(self):
|
|
3086
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3087
|
+
sv = 'whatsapp.Preview ( '
|
|
3088
|
+
for v in pr:
|
|
3089
|
+
if not callable(v[1]):
|
|
3090
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
|
3091
|
+
return sv + ')'
|
|
3312
3092
|
@property
|
|
3313
3093
|
def Kind(self):
|
|
3314
|
-
return _whatsapp.
|
|
3094
|
+
return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
|
|
3315
3095
|
@Kind.setter
|
|
3316
3096
|
def Kind(self, value):
|
|
3317
3097
|
if isinstance(value, go.GoClass):
|
|
3318
|
-
_whatsapp.
|
|
3098
|
+
_whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
|
|
3319
3099
|
else:
|
|
3320
|
-
_whatsapp.
|
|
3100
|
+
_whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
|
|
3321
3101
|
@property
|
|
3322
|
-
def
|
|
3323
|
-
return _whatsapp.
|
|
3324
|
-
@
|
|
3325
|
-
def
|
|
3102
|
+
def URL(self):
|
|
3103
|
+
return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
|
|
3104
|
+
@URL.setter
|
|
3105
|
+
def URL(self, value):
|
|
3326
3106
|
if isinstance(value, go.GoClass):
|
|
3327
|
-
_whatsapp.
|
|
3107
|
+
_whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
|
|
3328
3108
|
else:
|
|
3329
|
-
_whatsapp.
|
|
3109
|
+
_whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
|
|
3110
|
+
@property
|
|
3111
|
+
def Title(self):
|
|
3112
|
+
return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
|
|
3113
|
+
@Title.setter
|
|
3114
|
+
def Title(self, value):
|
|
3115
|
+
if isinstance(value, go.GoClass):
|
|
3116
|
+
_whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
|
|
3117
|
+
else:
|
|
3118
|
+
_whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
|
|
3119
|
+
@property
|
|
3120
|
+
def Description(self):
|
|
3121
|
+
return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
|
|
3122
|
+
@Description.setter
|
|
3123
|
+
def Description(self, value):
|
|
3124
|
+
if isinstance(value, go.GoClass):
|
|
3125
|
+
_whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
|
|
3126
|
+
else:
|
|
3127
|
+
_whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
|
|
3128
|
+
@property
|
|
3129
|
+
def Thumbnail(self):
|
|
3130
|
+
return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
|
|
3131
|
+
@Thumbnail.setter
|
|
3132
|
+
def Thumbnail(self, value):
|
|
3133
|
+
if isinstance(value, go.GoClass):
|
|
3134
|
+
_whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
|
|
3135
|
+
else:
|
|
3136
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
|
3137
|
+
|
|
3138
|
+
# Python type for struct whatsapp.Session
|
|
3139
|
+
class Session(go.GoClass):
|
|
3140
|
+
"""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"""
|
|
3141
|
+
def __init__(self, *args, **kwargs):
|
|
3142
|
+
"""
|
|
3143
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
|
3144
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
|
3145
|
+
in which case a new Go object is constructed first
|
|
3146
|
+
"""
|
|
3147
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
|
3148
|
+
self.handle = kwargs['handle']
|
|
3149
|
+
_whatsapp.IncRef(self.handle)
|
|
3150
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
|
3151
|
+
self.handle = args[0].handle
|
|
3152
|
+
_whatsapp.IncRef(self.handle)
|
|
3153
|
+
else:
|
|
3154
|
+
self.handle = _whatsapp.whatsapp_Session_CTor()
|
|
3155
|
+
_whatsapp.IncRef(self.handle)
|
|
3156
|
+
def __del__(self):
|
|
3157
|
+
_whatsapp.DecRef(self.handle)
|
|
3158
|
+
def __str__(self):
|
|
3159
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3160
|
+
sv = 'whatsapp.Session{'
|
|
3161
|
+
first = True
|
|
3162
|
+
for v in pr:
|
|
3163
|
+
if callable(v[1]):
|
|
3164
|
+
continue
|
|
3165
|
+
if first:
|
|
3166
|
+
first = False
|
|
3167
|
+
else:
|
|
3168
|
+
sv += ', '
|
|
3169
|
+
sv += v[0] + '=' + str(v[1])
|
|
3170
|
+
return sv + '}'
|
|
3171
|
+
def __repr__(self):
|
|
3172
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
|
3173
|
+
sv = 'whatsapp.Session ( '
|
|
3174
|
+
for v in pr:
|
|
3175
|
+
if not callable(v[1]):
|
|
3176
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
|
3177
|
+
return sv + ')'
|
|
3178
|
+
def Login(self):
|
|
3179
|
+
"""Login() str
|
|
3180
|
+
|
|
3181
|
+
Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
|
|
3182
|
+
or by initiating a pairing session for a new linked device. Callers are expected to have set an
|
|
3183
|
+
event handler in order to receive any incoming events from the underlying WhatsApp session.
|
|
3184
|
+
"""
|
|
3185
|
+
return _whatsapp.whatsapp_Session_Login(self.handle)
|
|
3186
|
+
def Logout(self):
|
|
3187
|
+
"""Logout() str
|
|
3188
|
+
|
|
3189
|
+
Logout disconnects and removes the current linked device locally and initiates a logout remotely.
|
|
3190
|
+
"""
|
|
3191
|
+
return _whatsapp.whatsapp_Session_Logout(self.handle)
|
|
3192
|
+
def Disconnect(self):
|
|
3193
|
+
"""Disconnect() str
|
|
3194
|
+
|
|
3195
|
+
Disconnects detaches the current connection to WhatsApp without removing any linked device state.
|
|
3196
|
+
"""
|
|
3197
|
+
return _whatsapp.whatsapp_Session_Disconnect(self.handle)
|
|
3198
|
+
def PairPhone(self, phone):
|
|
3199
|
+
"""PairPhone(str phone) str, str
|
|
3200
|
+
|
|
3201
|
+
PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
|
|
3202
|
+
user's primary device, as identified by the given phone number. This will return an error if the
|
|
3203
|
+
[Session] is already paired, or if the phone number given is empty or invalid.
|
|
3204
|
+
"""
|
|
3205
|
+
return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
|
|
3206
|
+
def SendMessage(self, message):
|
|
3207
|
+
"""SendMessage(object message) str
|
|
3208
|
+
|
|
3209
|
+
SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
|
|
3210
|
+
specified within. In general, different message kinds require different fields to be set; see the
|
|
3211
|
+
documentation for the [Message] type for more information.
|
|
3212
|
+
"""
|
|
3213
|
+
return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
|
|
3214
|
+
def GenerateMessageID(self):
|
|
3215
|
+
"""GenerateMessageID() str
|
|
3216
|
+
|
|
3217
|
+
GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
|
|
3218
|
+
"""
|
|
3219
|
+
return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
|
|
3220
|
+
def SendChatState(self, state):
|
|
3221
|
+
"""SendChatState(object state) str
|
|
3222
|
+
|
|
3223
|
+
SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
|
|
3224
|
+
contact specified within.
|
|
3225
|
+
"""
|
|
3226
|
+
return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
|
|
3227
|
+
def SendReceipt(self, receipt):
|
|
3228
|
+
"""SendReceipt(object receipt) str
|
|
3229
|
+
|
|
3230
|
+
SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
|
|
3231
|
+
"""
|
|
3232
|
+
return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
|
|
3233
|
+
def SendPresence(self, presence, statusMessage):
|
|
3234
|
+
"""SendPresence(int presence, str statusMessage) str
|
|
3235
|
+
|
|
3236
|
+
SendPresence sets the activity state and (optional) status message for the current session and
|
|
3237
|
+
user. An error is returned if setting availability fails for any reason.
|
|
3238
|
+
"""
|
|
3239
|
+
return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
|
|
3240
|
+
def GetContacts(self, refresh):
|
|
3241
|
+
"""GetContacts(bool refresh) []object, str
|
|
3242
|
+
|
|
3243
|
+
GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
|
|
3244
|
+
If `refresh` is `true`, FetchRoster will pull application state from the remote service and
|
|
3245
|
+
synchronize any contacts found with the adapter.
|
|
3246
|
+
"""
|
|
3247
|
+
return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
|
|
3248
|
+
def GetGroups(self):
|
|
3249
|
+
"""GetGroups() []object, str
|
|
3250
|
+
|
|
3251
|
+
GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
|
|
3252
|
+
information on present participants.
|
|
3253
|
+
"""
|
|
3254
|
+
return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
|
|
3255
|
+
def CreateGroup(self, name, participants):
|
|
3256
|
+
"""CreateGroup(str name, []str participants) object, str
|
|
3257
|
+
|
|
3258
|
+
CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
|
|
3259
|
+
participant JIDs given.
|
|
3260
|
+
"""
|
|
3261
|
+
return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
|
|
3262
|
+
def LeaveGroup(self, resourceID):
|
|
3263
|
+
"""LeaveGroup(str resourceID) str
|
|
3264
|
+
|
|
3265
|
+
LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
|
|
3266
|
+
"""
|
|
3267
|
+
return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
|
|
3268
|
+
def GetAvatar(self, resourceID, avatarID):
|
|
3269
|
+
"""GetAvatar(str resourceID, str avatarID) object, str
|
|
3270
|
+
|
|
3271
|
+
GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
|
|
3272
|
+
is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
|
|
3273
|
+
for the given ID has not changed.
|
|
3274
|
+
"""
|
|
3275
|
+
return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
|
|
3276
|
+
def SetAvatar(self, resourceID, avatar):
|
|
3277
|
+
"""SetAvatar(str resourceID, []int avatar) str, str
|
|
3278
|
+
|
|
3279
|
+
SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
|
|
3280
|
+
profile picture for our own user by providing an empty JID. The unique picture ID is returned,
|
|
3281
|
+
typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
|
|
3282
|
+
"""
|
|
3283
|
+
return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
|
|
3284
|
+
def SetGroupName(self, resourceID, name):
|
|
3285
|
+
"""SetGroupName(str resourceID, str name) str
|
|
3286
|
+
|
|
3287
|
+
SetGroupName updates the name of a WhatsApp group for the Group JID given.
|
|
3288
|
+
"""
|
|
3289
|
+
return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
|
|
3290
|
+
def SetGroupTopic(self, resourceID, topic):
|
|
3291
|
+
"""SetGroupTopic(str resourceID, str topic) str
|
|
3292
|
+
|
|
3293
|
+
SetGroupName updates the topic of a WhatsApp group for the Group JID given.
|
|
3294
|
+
"""
|
|
3295
|
+
return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
|
|
3296
|
+
def UpdateGroupParticipants(self, resourceID, participants):
|
|
3297
|
+
"""UpdateGroupParticipants(str resourceID, []object participants) []object, str
|
|
3298
|
+
|
|
3299
|
+
UpdateGroupParticipants processes changes to the given group's participants, including additions,
|
|
3300
|
+
removals, and changes to privileges. Participant JIDs given must be part of the authenticated
|
|
3301
|
+
session's roster at least, and must also be active group participants for other types of changes.
|
|
3302
|
+
"""
|
|
3303
|
+
return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
|
|
3304
|
+
def FindContact(self, phone):
|
|
3305
|
+
"""FindContact(str phone) object, str
|
|
3306
|
+
|
|
3307
|
+
FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
|
|
3308
|
+
phone number, returning a concrete instance if found; typically, only the contact JID is set. No
|
|
3309
|
+
error is returned if no contact was found, but any unexpected errors will otherwise be returned
|
|
3310
|
+
directly.
|
|
3311
|
+
"""
|
|
3312
|
+
return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
|
|
3313
|
+
def RequestMessageHistory(self, resourceID, oldestMessage):
|
|
3314
|
+
"""RequestMessageHistory(str resourceID, object oldestMessage) str
|
|
3315
|
+
|
|
3316
|
+
RequestMessageHistory sends and asynchronous request for message history related to the given
|
|
3317
|
+
resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
|
|
3318
|
+
history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
|
|
3319
|
+
event handler. An error will be returned if requesting history fails for any reason.
|
|
3320
|
+
"""
|
|
3321
|
+
return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
|
|
3322
|
+
def SetEventHandler(self, h, goRun=False):
|
|
3323
|
+
"""SetEventHandler(callable h)
|
|
3324
|
+
|
|
3325
|
+
SetEventHandler assigns the given handler function for propagating internal events into the Python
|
|
3326
|
+
gateway. Note that the event handler function is not entirely safe to use directly, and all calls
|
|
3327
|
+
should instead be sent to the [Gateway] via its internal call channel.
|
|
3328
|
+
"""
|
|
3329
|
+
_whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
|
|
3330
3330
|
|
|
3331
3331
|
|
|
3332
3332
|
# ---- Slices ---
|