@@ -463,6 +463,58 @@ def search_repositories(query, sort=None, order=None, per_page=None,
463463 number , etag )
464464
465465
466+ def search_users (query , sort = None , order = None , per_page = None ,
467+ text_match = False , number = - 1 , etag = None ):
468+ """Find users via the Search API.
469+
470+ .. warning::
471+
472+ You will only be able to make 5 calls with this or other search
473+ functions. To raise the rate-limit on this set of endpoints, create an
474+ authenticated :class:`GitHub <github3.github.GitHub>` Session with
475+ ``login``.
476+
477+ The query can contain any combination of the following supported
478+ qualifers:
479+
480+
481+ - ``type`` With this qualifier you can restrict the search to just
482+ personal accounts or just organization accounts.
483+ - ``in`` Qualifies which fields are searched. With this qualifier you
484+ can restrict the search to just the username, public email, full
485+ name, or any combination of these.
486+ - ``repos`` Filters users based on the number of repositories they
487+ have.
488+ - ``location`` Filter users by the location indicated in their
489+ profile.
490+ - ``language`` Search for users that have repositories that match a
491+ certain language.
492+ - ``created`` Filter users based on when they joined.
493+ - ``followers`` Filter users based on the number of followers they
494+ have.
495+
496+ For more information about these qualifiers see: http://git.io/wjVYJw
497+
498+ :param str query: (required), a valid query as described above, e.g.,
499+ ``tom repos:>42 followers:>1000``
500+ :param str sort: (optional), how the results should be sorted;
501+ options: ``followers``, ``repositories``, or ``joined``; default:
502+ best match
503+ :param str order: (optional), the direction of the sorted results,
504+ options: ``asc``, ``desc``; default: ``desc``
505+ :param int per_page: (optional)
506+ :param bool text_match: (optional), if True, return matching search
507+ terms. See http://git.io/_V1zRwa for more information
508+ :param int number: (optional), number of search results to return;
509+ Default: -1 returns all available
510+ :param str etag: (optional), ETag header value of the last request.
511+ :return: generator of :class:`UserSearchResult
512+ <github3.search.UserSearchResult>`
513+ """
514+ return gh .search_users (query , sort , order , per_page , text_match , number ,
515+ etag )
516+
517+
466518def user (login ):
467519 return gh .user (login )
468520user .__doc__ = gh .user .__doc__
0 commit comments