@@ -951,6 +951,12 @@ def remove_reaction(self, reaction_data: Dict[str, Any]) -> Dict[str, Any]:
951
951
)
952
952
953
953
def get_realm_emoji (self ) -> Dict [str , Any ]:
954
+ logger .warning (
955
+ "get_realm_emoji() is deprecated." " Please use get_custom_emoji() instead."
956
+ )
957
+ return self .get_custom_emoji ()
958
+
959
+ def get_custom_emoji (self ) -> Dict [str , Any ]:
954
960
"""
955
961
See examples/realm-emoji for example usage.
956
962
"""
@@ -1000,6 +1006,12 @@ def get_realm_linkifiers(self) -> Dict[str, Any]:
1000
1006
)
1001
1007
1002
1008
def add_realm_filter (self , pattern : str , url_format_string : str ) -> Dict [str , Any ]:
1009
+ logger .warning (
1010
+ "get_members() is deprecated." " Please use get_users() instead."
1011
+ )
1012
+ self .add_linkifier (pattern , url_format_string )
1013
+
1014
+ def add_linkifier (self , pattern : str , url_format_string : str ) -> Dict [str , Any ]:
1003
1015
"""
1004
1016
Example usage:
1005
1017
@@ -1078,6 +1090,12 @@ def reorder_realm_profile_fields(self, **request: Any) -> Dict[str, Any]:
1078
1090
)
1079
1091
1080
1092
def update_realm_profile_field (self , field_id : int , ** request : Any ) -> Dict [str , Any ]:
1093
+ logger .warning (
1094
+ "update_realm_profile_field() is deprecated." " Please use update_linkifier() instead."
1095
+ )
1096
+ return self .update_linkifier (field_id )
1097
+
1098
+ def update_linkifier (self , field_id : int , ** request : Any ) -> Dict [str , Any ]:
1081
1099
"""
1082
1100
Example usage:
1083
1101
@@ -1157,6 +1175,12 @@ def deregister(self, queue_id: str, timeout: Optional[float] = None) -> Dict[str
1157
1175
)
1158
1176
1159
1177
def get_profile (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1178
+ logger .warning (
1179
+ "get_profile() is deprecated." " Please use get_own_user() instead."
1180
+ )
1181
+ self .get_own_user (request )
1182
+
1183
+ def get_own_user (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1160
1184
"""
1161
1185
Example usage:
1162
1186
@@ -1321,8 +1345,9 @@ def get_users(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
1321
1345
def get_members (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1322
1346
# This exists for backwards-compatibility; we renamed this
1323
1347
# function get_users for consistency with the rest of the API.
1324
- # Later, we may want to add a warning for clients using this
1325
- # legacy name.
1348
+ logger .warning (
1349
+ "get_members() is deprecated." " Please use get_users() instead."
1350
+ )
1326
1351
return self .get_users (request = request )
1327
1352
1328
1353
def get_alert_words (self ) -> Dict [str , Any ]:
@@ -1364,6 +1389,12 @@ def list_subscriptions(self, request: Optional[Dict[str, Any]] = None) -> Dict[s
1364
1389
return self .get_subscriptions (request )
1365
1390
1366
1391
def add_subscriptions (self , streams : Iterable [Dict [str , Any ]], ** kwargs : Any ) -> Dict [str , Any ]:
1392
+ logger .warning (
1393
+ "add_subscriptions() is deprecated." " Please use subscribe() instead."
1394
+ )
1395
+ return self .subscribe (streams )
1396
+
1397
+ def subscribe (self , streams : Iterable [Dict [str , Any ]], ** kwargs : Any ) -> Dict [str , Any ]:
1367
1398
"""
1368
1399
See examples/subscribe for example usage.
1369
1400
"""
@@ -1376,6 +1407,14 @@ def add_subscriptions(self, streams: Iterable[Dict[str, Any]], **kwargs: Any) ->
1376
1407
1377
1408
def remove_subscriptions (
1378
1409
self , streams : Iterable [str ], principals : Union [Sequence [str ], Sequence [int ]] = []
1410
+ ) -> Dict [str , Any ]:
1411
+ logger .warning (
1412
+ "remove_subscriptions() is deprecated." " Please use unsubscribe() instead."
1413
+ )
1414
+ return self .unsubscribe (streams , principals )
1415
+
1416
+ def unsubscribe (
1417
+ self , streams : Iterable [str ], principals : Union [Sequence [str ], Sequence [int ]] = []
1379
1418
) -> Dict [str , Any ]:
1380
1419
"""
1381
1420
See examples/unsubscribe for example usage.
0 commit comments