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