File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,15 @@ class RepositoriesService extends Service {
311
311
312
312
// TODO: Implement updateFile: https://developer.github.com/v3/repos/contents/#update-a-file
313
313
// TODO: Implement deleteFile: https://developer.github.com/v3/repos/contents/#delete-a-file
314
- // TODO: Implement getArchiveLink: https://developer.github.com/v3/repos/contents/#get-archive-link
314
+
315
+ /// Gets an archive link for the specified repository and reference.
316
+ ///
317
+ /// API docs: https://developer.github.com/v3/repos/contents/#get-archive-link
318
+ Future <String > getArchiveLink (RepositorySlug slug, String ref, {String format: "tarball" }) {
319
+ return _github.request ("GET" , "/repos/${slug .fullName }/${format }/${ref }" , statusCode: 302 ).then ((response) {
320
+ return response.headers["Location" ];
321
+ });
322
+ }
315
323
316
324
/// Lists the forks of the specified repository.
317
325
///
@@ -504,7 +512,7 @@ class RepositoriesService extends Service {
504
512
return _github.postJSON ("/repos/${slug .fullName }/statuses/${ref }" ,
505
513
body: request.toJSON (), convert: RepositoryStatus .fromJSON);
506
514
}
507
-
515
+
508
516
/// Gets a Combined Status for the specified repository and ref.
509
517
///
510
518
/// API docs: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
You can’t perform that action at this time.
0 commit comments