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