@@ -951,6 +951,9 @@ 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
+ return self .get_custom_emoji ()
955
+
956
+ def get_custom_emoji (self ) -> Dict [str , Any ]:
954
957
"""
955
958
See examples/realm-emoji for example usage.
956
959
"""
@@ -998,8 +1001,14 @@ def get_realm_linkifiers(self) -> Dict[str, Any]:
998
1001
url = "realm/linkifiers" ,
999
1002
method = "GET" ,
1000
1003
)
1001
-
1004
+
1002
1005
def add_realm_filter (self , pattern : str , url_format_string : str ) -> Dict [str , Any ]:
1006
+ logger .warning (
1007
+ "get_members() is deprecated." " Please use get_users() instead."
1008
+ )
1009
+ self .add_linkifier (pattern , url_format_string )
1010
+
1011
+ def add_linkifier (self , pattern : str , url_format_string : str ) -> Dict [str , Any ]:
1003
1012
"""
1004
1013
Example usage:
1005
1014
@@ -1015,6 +1024,7 @@ def add_realm_filter(self, pattern: str, url_format_string: str) -> Dict[str, An
1015
1024
},
1016
1025
)
1017
1026
1027
+
1018
1028
def remove_realm_filter (self , filter_id : int ) -> Dict [str , Any ]:
1019
1029
"""
1020
1030
Example usage:
@@ -1078,6 +1088,9 @@ def reorder_realm_profile_fields(self, **request: Any) -> Dict[str, Any]:
1078
1088
)
1079
1089
1080
1090
def update_realm_profile_field (self , field_id : int , ** request : Any ) -> Dict [str , Any ]:
1091
+ self .update_linkifier (field_id )
1092
+
1093
+ def update_linkifier (self , field_id : int , ** request : Any ) -> Dict [str , Any ]:
1081
1094
"""
1082
1095
Example usage:
1083
1096
@@ -1157,6 +1170,9 @@ def deregister(self, queue_id: str, timeout: Optional[float] = None) -> Dict[str
1157
1170
)
1158
1171
1159
1172
def get_profile (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1173
+ self .get_own_user (request )
1174
+
1175
+ def get_own_user (self , request : Optional [Dict [str , Any ]] = None ) -> Dict [str , Any ]:
1160
1176
"""
1161
1177
Example usage:
1162
1178
@@ -1323,6 +1339,9 @@ def get_members(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any
1323
1339
# function get_users for consistency with the rest of the API.
1324
1340
# Later, we may want to add a warning for clients using this
1325
1341
# legacy name.
1342
+ logger .warning (
1343
+ "get_members() is deprecated." " Please use get_users() instead."
1344
+ )
1326
1345
return self .get_users (request = request )
1327
1346
1328
1347
def get_alert_words (self ) -> Dict [str , Any ]:
@@ -1362,8 +1381,14 @@ def list_subscriptions(self, request: Optional[Dict[str, Any]] = None) -> Dict[s
1362
1381
"list_subscriptions() is deprecated." " Please use get_subscriptions() instead."
1363
1382
)
1364
1383
return self .get_subscriptions (request )
1365
-
1384
+
1366
1385
def add_subscriptions (self , streams : Iterable [Dict [str , Any ]], ** kwargs : Any ) -> Dict [str , Any ]:
1386
+ logger .warning (
1387
+ "add_subscriptions() is deprecated." " Please use subscribe() instead."
1388
+ )
1389
+ return self .subscribe (streams )
1390
+
1391
+ def subscribe (self , streams : Iterable [Dict [str , Any ]], ** kwargs : Any ) -> Dict [str , Any ]:
1367
1392
"""
1368
1393
See examples/subscribe for example usage.
1369
1394
"""
@@ -1376,6 +1401,11 @@ def add_subscriptions(self, streams: Iterable[Dict[str, Any]], **kwargs: Any) ->
1376
1401
1377
1402
def remove_subscriptions (
1378
1403
self , streams : Iterable [str ], principals : Union [Sequence [str ], Sequence [int ]] = []
1404
+ ) -> Dict [str , Any ]:
1405
+ return self .unsubscribe (streams , principals )
1406
+
1407
+ def unsubscribe (
1408
+ self , streams : Iterable [str ], principals : Union [Sequence [str ], Sequence [int ]] = []
1379
1409
) -> Dict [str , Any ]:
1380
1410
"""
1381
1411
See examples/unsubscribe for example usage.
0 commit comments