@@ -985,6 +985,28 @@ def repository(self, owner, repository):
985985json = self ._json (self ._get (url ),200 )
986986return Repository (json ,self )if json else None
987987
988+ def search_code (self ,query ,sort = None ,order = None ,per_page = None ,
989+ text_match = False ,number = - 1 ,etag = None ):
990+ """Find code via the code search API.
991+
992+ The query can contain any combination of the following supported
993+ qualifiers:
994+
995+ - in Qualifies which fields are searched. With this qualifier you can
996+ restrict the search to just the file contents, the file path, or
997+ both.
998+ - language Searches code based on the language it’s written in.
999+ - fork Specifies that code from forked repositories should be
1000+ searched. Repository forks will not be searchable unless the fork
1001+ has more stars than the parent repository.
1002+ - size Finds files that match a certain size (in bytes).
1003+ - path Specifies the path that the resulting file must be at.
1004+ - extension Matches files with a certain extension.
1005+ - user or repo Limits searches to a specific user or repository.
1006+
1007+
1008+ """
1009+
9881010def search_repositories (self ,query ,sort = None ,order = None ,
9891011per_page = None ,text_match = False ,number = - 1 ,
9901012etag = None ):