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