@@ -798,27 +798,42 @@ def set_settings(self, settings, forward_to_slaves=True,
798798 def listUserKeys (self ):
799799 return self .list_user_keys ()
800800
801+ @deprecated
801802 def list_user_keys (self ):
803+ """Use `list_api_keys`"""
804+ return self .list_api_keys ()
805+
806+ def list_api_keys (self ):
802807 """
803- List all existing user keys of this index with their associated ACLs.
808+ List all existing api keys of this index with their associated ACLs.
804809 """
805810 return self ._req (True , '/keys' , 'GET' )
806811
807812 @deprecated
808813 def getUserKeyACL (self , key ):
809814 return self .get_user_key_acl (key )
810815
816+ @deprecated
811817 def get_user_key_acl (self , key ):
812- """Get ACL of a user key associated to this index."""
818+ """Use `get_api_key_acl`"""
819+ return self .get_api_key_acl (key )
820+
821+ def get_api_key_acl (self , key ):
822+ """Get ACL of a api key associated to this index."""
813823 path = '/keys/%s' % key
814824 return self ._req (True , path , 'GET' )
815825
816826 @deprecated
817827 def deleteUserKey (self , key ):
818828 return self .delete_user_key (key )
819829
830+ @deprecated
820831 def delete_user_key (self , key ):
821- """Delete an existing user key associated to this index."""
832+ """Use `delete_api_key`"""
833+ return self .delete_api_key (key )
834+
835+ def delete_api_key (self , key ):
836+ """Delete an existing api key associated to this index."""
822837 path = '/keys/%s' % key
823838 return self ._req (False , path , 'DELETE' )
824839
@@ -828,10 +843,19 @@ def addUserKey(self, obj, validity=0, max_queries_per_ip_per_hour=0,
828843 return self .add_user_key (obj , validity , max_queries_per_ip_per_hour ,
829844 max_hits_per_query )
830845
846+ @deprecated
831847 def add_user_key (self , obj , validity = 0 , max_queries_per_ip_per_hour = 0 ,
832848 max_hits_per_query = 0 ):
849+ """Use `add_api_key`"""
850+ return self .add_api_key (
851+ obj , validity , max_queries_per_ip_per_hour ,
852+ max_hits_per_query
853+ )
854+
855+ def add_api_key (self , obj , validity = 0 , max_queries_per_ip_per_hour = 0 ,
856+ max_hits_per_query = 0 ):
833857 """
834- Create a new user key associated to this index (can only access to
858+ Create a new api key associated to this index (can only access to
835859 this index).
836860
837861 @param obj can be two different parameters:
@@ -872,11 +896,21 @@ def add_user_key(self, obj, validity=0, max_queries_per_ip_per_hour=0,
872896
873897 return self ._req (False , '/keys' , 'POST' , data = obj )
874898
899+ @deprecated
875900 def update_user_key (self , key , obj , validity = None ,
876901 max_queries_per_ip_per_hour = None ,
877902 max_hits_per_query = None ):
903+ """Use `update_api_key`"""
904+ return self .update_api_key (
905+ key , obj , validity , max_queries_per_ip_per_hour ,
906+ max_hits_per_query
907+ )
908+
909+ def update_api_key (self , key , obj , validity = None ,
910+ max_queries_per_ip_per_hour = None ,
911+ max_hits_per_query = None ):
878912 """
879- Update a user key associated to this index (can only access to this index).
913+ Update a api key associated to this index (can only access to this index).
880914
881915 @param obj can be two different parameters:
882916 The list of parameters for this key. Defined by a dictionary that
0 commit comments