@@ -353,11 +353,6 @@ def repository(owner, repository):
353
353
repository .__doc__ = gh .repository .__doc__
354
354
355
355
356
- def user (login ):
357
- return gh .user (login )
358
- user .__doc__ = gh .user .__doc__
359
-
360
-
361
356
def ratelimit_remaining ():
362
357
"""Get the remaining number of requests allowed.
363
358
@@ -367,6 +362,60 @@ def ratelimit_remaining():
367
362
return gh .ratelimit_remaining
368
363
369
364
365
+ def search_repositories (query ,sort = None ,order = None ,per_page = None ,
366
+ text_match = False ,number = - 1 ,etag = None ):
367
+ """Find repositories via various criteria.
368
+
369
+ .. warning::
370
+
371
+ You will only be able to make 5 calls with this or other search
372
+ functions. To raise the rate-limit on this set of endpoints, create an
373
+ authenticated :class:`GitHub <github3.github.GitHub>` Session with
374
+ ``login``.
375
+
376
+ The query can contain any combination of the following supported
377
+ qualifers:
378
+
379
+ - ``in`` Qualifies which fields are searched. With this qualifier you
380
+ can restrict the search to just the repository name, description,
381
+ readme, or any combination of these.
382
+ - ``size`` Finds repositories that match a certain size (in
383
+ kilobytes).
384
+ - ``forks`` Filters repositories based on the number of forks, and/or
385
+ whether forked repositories should be included in the results at
386
+ all.
387
+ - ``created`` or ``pushed`` Filters repositories based on times of
388
+ creation, or when they were last updated.
389
+ - ``user`` or ``repo`` Limits searches to a specific user or
390
+ repository.
391
+ - ``language`` Searches repositories based on the language they're
392
+ written in.
393
+ - ``stars`` Searches repositories based on the number of stars.
394
+
395
+ :param str query: (required), a valid query as described above, e.g.,
396
+ ``tetris language:assembly``
397
+ :param str sort: (optional), how the results should be sorted;
398
+ options: ``stars``, ``forks``, ``updated``; default: best match
399
+ :param str order: (optional), the direction of the sorted results,
400
+ options: ``asc``, ``desc``; default: ``desc``
401
+ :param int per_page: (optional)
402
+ :param bool text_match: (optional), if True, return matching search
403
+ terms. See http://git.io/4ct1eQ for more information
404
+ :param int number: (optional), number of repositories to return.
405
+ Default: -1, returns all available repositories
406
+ :param str etag: (optional), previous ETag header value
407
+ :return: dict
408
+ """
409
+ return gh .search_repositories (query ,sort ,order ,per_page ,text_match ,
410
+ number ,etag )
411
+ # TODO Describe the dictionary being returned
412
+
413
+
414
+ def user (login ):
415
+ return gh .user (login )
416
+ user .__doc__ = gh .user .__doc__
417
+
418
+
370
419
def zen ():
371
420
"""Return a quote from the Zen of GitHub. Yet another API Easter Egg.
372
421