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