Implement License API (#734)

* Implement License API

* Update copyright
This commit is contained in:
Wan Liuyang
2018-04-06 09:17:19 +08:00
committed by GitHub
parent 911bf61522
commit b54ccc784e
12 changed files with 315 additions and 0 deletions
+12
View File
@@ -1933,6 +1933,18 @@ class Repository(github.GithubObject.CompletableGithubObject):
)
return data
def get_license(self):
"""
:calls: `GET /repos/:owner/:repo/license <https://developer.github.com/v3/licenses>`_
:rtype: :class:`github.ContentFile.ContentFile`
"""
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.url + "/license"
)
return github.ContentFile.ContentFile(self._requester, headers, data, completed=True)
def get_milestone(self, number):
"""
:calls: `GET /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_