File tree 1 file changed +20
-3
lines changed
1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -568,16 +568,33 @@ class UserManager(BaseManager):
568
568
def search (self , query , ** kwargs ):
569
569
"""Search users.
570
570
571
- Returns a list of matching users.
571
+ Args:
572
+ query (str): The query string to send to GitLab for the search.
573
+ **kwargs: Additional arguments to send to GitLab.
574
+
575
+ Returns:
576
+ list(User): A list of matching users.
577
+
578
+ Raises:
579
+ GitlabConnectionError: If the server cannot be reached.
580
+ GitlabListError: If the server fails to perform the request.
572
581
"""
573
582
url = self .obj_cls ._url + '?search=' + query
574
583
return self ._custom_list (url , self .obj_cls , ** kwargs )
575
584
576
585
def get_by_username (self , username , ** kwargs ):
577
586
"""Get a user by its username.
578
587
579
- Returns a User object or None if the named user does not
580
- exist.
588
+ Args:
589
+ username (str): The name of the user.
590
+ **kwargs: Additional arguments to send to GitLab.
591
+
592
+ Returns:
593
+ User: The matching user.
594
+
595
+ Raises:
596
+ GitlabConnectionError: If the server cannot be reached.
597
+ GitlabGetError: If the server fails to perform the request.
581
598
"""
582
599
url = self .obj_cls ._url + '?username=' + username
583
600
results = self ._custom_list (url , self .obj_cls , ** kwargs )
You can’t perform that action at this time.
0 commit comments