'Get the tarball or zipball archive for this release.
:param str format: (required), accepted values: (\'tarball\',
\'zipball\')
:param path: (optional), path where the file should be saved
to, default is the filename provided in the headers and will be
written in the current directory.
it can take a file-like object as well
:type path: str, file
:returns: bool -- True if successful, False otherwise'

def archive(self, format, path=u''):

    resp = None
    if (format in (u'tarball', u'zipball')):
        repo_url = self._api[:self._api.rfind(u'/releases')]
        url = self._build_url(format, self.tag_name, base_url=repo_url)
        resp = self._get(url, allow_redirects=True, stream=True)
    if (resp and self._boolean(resp, 200, 404)):
        utils.stream_response_to_file(resp, path)
        return True
    return False
