Search Results¶
These classes are meant to expose the entirety of an item returned as a search result by GitHub’s Search API.
-
class
github3.search.CodeSearchResult(json, session)¶ A representation of a code search result from the API.
This object has the following attributes:
-
git_url¶ The URL to retrieve the blob via Git
-
html_url¶ The URL to view the blob found in a browser.
-
name¶ The name of the file where the search result was found.
-
path¶ The path in the repository to the file containing the result.
-
repository¶ A
ShortRepositoryrepresenting the repository in which the result was found.
-
score¶ The confidence score assigned to the result.
-
sha¶ The SHA1 of the blob in which the code can be found.
-
text_matches¶ A list of the text matches in the blob that generated this result.
Note
To receive these, you must pass
text_match=Truetosearch_code().
-
-
class
github3.search.IssueSearchResult(json, session)¶ A representation of a search result containing an issue.
This object has the following attributes:
-
issue¶ A
ShortIssuerepresenting the issue found in this search result.
-
score¶ The confidence score of this search result.
-
text_matches¶ A list of matches in the issue for this search result.
Note
To receive these, you must pass
text_match=Truetosearch_issues().
-
-
class
github3.search.RepositorySearchResult(json, session)¶ A representation of a search result containing a repository.
This object has the following attributes:
.. attribute:: repository
AShortRepositoryrepresenting the repository found by the search.-
score¶ The confidence score of this search result.
-
text_matches¶ A list of the text matches in the repository that generated this result.
Note
To receive these, you must pass
text_match=Truetosearch_code().
-