mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Repository.get_archive_link (issue #65)
This commit is contained in:
@@ -498,6 +498,20 @@ class Repository( GithubObject.GithubObject ):
|
||||
)
|
||||
self._useAttributes( data )
|
||||
|
||||
def get_archive_link( self, archive_format, ref = GithubObject.NotSet ):
|
||||
assert isinstance( archive_format, ( str, unicode ) ), archive_format
|
||||
assert ref is GithubObject.NotSet or isinstance( ref, ( str, unicode ) ), ref
|
||||
url = self.url + "/" + archive_format
|
||||
if ref is not GithubObject.NotSet:
|
||||
url += "/" + ref
|
||||
headers, data = self._requester.requestAndCheck(
|
||||
"GET",
|
||||
url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
return headers[ "location" ]
|
||||
|
||||
def get_assignees( self ):
|
||||
headers, data = self._requester.requestAndCheck(
|
||||
"GET",
|
||||
|
||||
Reference in New Issue
Block a user