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