@@ -951,6 +951,10 @@ 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 ("get_realm_emoji() is deprecated." " Please use get_custom_emoji() instead." )
955
+ return self .get_custom_emoji ()
956
+
957
+ def get_custom_emoji (self ) -> Dict [str , Any ]:
954
958
"""
955
959
See examples/realm-emoji for example usage.
956
960
"""
@@ -1000,6 +1004,10 @@ def get_realm_linkifiers(self) -> Dict[str, Any]:
1000
1004
)
1001
1005
1002
1006
def add_realm_filter (self , pattern : str , url_format_string : str ) -> Dict [str , Any ]:
1007
+ logger .warning ("get_members() is deprecated." " Please use get_users() instead." )
1008
+ self .add_linkifier (pattern , url_format_string )
1009
+
1010
+ def add_linkifier (self , pattern : str , url_format_string : str ) -> Dict [str , Any ]:
1003
1011
"""
1004
1012
Example usage:
1005
1013
@@ -1078,6 +1086,12 @@ def reorder_realm_profile_fields(self, **request: Any) -> Dict[str, Any]:
1078
1086
)
1079
1087
1080
1088
def update_realm_profile_field (self , field_id : int , ** request : Any ) -> Dict [str , Any ]:
1089
+ logger .warning (
1090
+ "update_realm_profile_field() is deprecated." " Please use update_linkifier() instead."
1091
+ )
1092
+ return self .update_linkifier (field_id )
1093
+
1094
+ def update_linkifier (self , field_id : int , ** request : Any ) -> Dict [str , Any ]:
1081
1095
"""
1082
1096
Example usage:
1083
1097
@@ -1157,6 +1171,10 @@ def deregister(self, queue_id: str, timeout: Optional[float] = None) -> Dict[str
1157
1171
)
1158
1172
1159
1173
def get_profile (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1174
+ logger .warning ("get_profile() is deprecated." " Please use get_own_user() instead." )
1175
+ self .get_own_user (request )
1176
+
1177
+ def get_own_user (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1160
1178
"""
1161
1179
Example usage:
1162
1180
@@ -1321,8 +1339,7 @@ def get_users(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
1321
1339
def get_members (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1322
1340
# This exists for backwards-compatibility; we renamed this
1323
1341
# 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.
1342
+ logger .warning ("get_members() is deprecated." " Please use get_users() instead." )
1326
1343
return self .get_users (request = request )
1327
1344
1328
1345
def get_alert_words (self ) -> Dict [str , Any ]:
@@ -1364,6 +1381,10 @@ def list_subscriptions(self, request: Optional[Dict[str, Any]] = None) -> Dict[s
1364
1381
return self .get_subscriptions (request )
1365
1382
1366
1383
def add_subscriptions (self , streams : Iterable [Dict [str , Any ]], ** kwargs : Any ) -> Dict [str , Any ]:
1384
+ logger .warning ("add_subscriptions() is deprecated." " Please use subscribe() instead." )
1385
+ return self .subscribe (streams )
1386
+
1387
+ def subscribe (self , streams : Iterable [Dict [str , Any ]], ** kwargs : Any ) -> Dict [str , Any ]:
1367
1388
"""
1368
1389
See examples/subscribe for example usage.
1369
1390
"""
@@ -1376,6 +1397,12 @@ def add_subscriptions(self, streams: Iterable[Dict[str, Any]], **kwargs: Any) ->
1376
1397
1377
1398
def remove_subscriptions (
1378
1399
self , streams : Iterable [str ], principals : Union [Sequence [str ], Sequence [int ]] = []
1400
+ ) -> Dict [str , Any ]:
1401
+ logger .warning ("remove_subscriptions() is deprecated." " Please use unsubscribe() instead." )
1402
+ return self .unsubscribe (streams , principals )
1403
+
1404
+ def unsubscribe (
1405
+ self , streams : Iterable [str ], principals : Union [Sequence [str ], Sequence [int ]] = []
1379
1406
) -> Dict [str , Any ]:
1380
1407
"""
1381
1408
See examples/unsubscribe for example usage.
0 commit comments