getArchiveLink method
Gets an archive link for the specified repository and reference.
API docs: https://developer.github.com/v3/repos/contents/#get-archive-link
Implementation
Future<String?> getArchiveLink(RepositorySlug slug, String ref,
{String format = 'tarball'}) async {
ArgumentError.checkNotNull(slug);
ArgumentError.checkNotNull(ref);
ArgumentError.checkNotNull(format);
final response = await github.request(
'GET',
'/repos/${slug.fullName}/$format/$ref',
statusCode: StatusCodes.FOUND,
);
return response.headers['Location'];
}