diff --git a/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs
index 248dc024..4f1456b9 100644
--- a/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs
@@ -96,18 +96,6 @@ namespace Octokit.Reactive
/// A promise, containing the binary contents of the archive
IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference);
- ///
- /// Get an archive of a given repository's contents, in a specific format
- ///
- /// https://developer.github.com/v3/repos/contents/#get-archive-link
- /// The owner of the repository
- /// The name of the repository
- /// The format of the archive. Can be either tarball or zipball
- /// A valid Git reference.
- /// Timeout in minutes
- /// The binary contents of the archive
- IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, int timeout);
-
///
/// Get an archive of a given repository's contents, in a specific format
///
diff --git a/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs
index c83feeab..b83d516e 100644
--- a/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs
@@ -74,7 +74,7 @@ namespace Octokit.Reactive
/// A promise, containing the binary contents of the archive
public IObservable GetArchive(string owner, string name)
{
- return _client.Repository.Content.GetArchive(owner, name).ToObservable();
+ return GetArchive(owner, name, ArchiveFormat.Tarball);
}
///
@@ -104,7 +104,7 @@ namespace Octokit.Reactive
/// A promise, containing the binary contents of the archive
public IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat)
{
- return _client.Repository.Content.GetArchive(owner, name, archiveFormat).ToObservable();
+ return GetArchive(owner, name, archiveFormat, string.Empty);
}
///
@@ -139,7 +139,7 @@ namespace Octokit.Reactive
/// A promise, containing the binary contents of the archive
public IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference)
{
- return _client.Repository.Content.GetArchive(owner, name, archiveFormat, reference).ToObservable();
+ return GetArchive(owner, name, archiveFormat, reference, TimeSpan.FromMinutes(60));
}
///
@@ -165,21 +165,6 @@ namespace Octokit.Reactive
.GetAndFlattenAllPages(ApiUrls.RepositoryContent(owner, name, path));
}
- ///
- /// Get an archive of a given repository's contents, in a specific format
- ///
- /// https://developer.github.com/v3/repos/contents/#get-archive-link
- /// The owner of the repository
- /// The name of the repository
- /// The format of the archive. Can be either tarball or zipball
- /// A valid Git reference.
- /// Timeout in minutes
- /// The binary contents of the archive
- public IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, int timeout)
- {
- return _client.Repository.Content.GetArchive(owner, name, archiveFormat, reference, timeout).ToObservable();
- }
-
///
/// Get an archive of a given repository's contents, in a specific format
///
@@ -192,6 +177,10 @@ namespace Octokit.Reactive
/// The binary contents of the archive
public IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, TimeSpan timeout)
{
+ Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.GreaterThanZero(timeout, "timeout");
+
return _client.Repository.Content.GetArchive(owner, name, archiveFormat, reference, timeout).ToObservable();
}
diff --git a/Octokit/Clients/IRepositoryContentsClient.cs b/Octokit/Clients/IRepositoryContentsClient.cs
index eedf27fa..45ae800b 100644
--- a/Octokit/Clients/IRepositoryContentsClient.cs
+++ b/Octokit/Clients/IRepositoryContentsClient.cs
@@ -137,18 +137,6 @@ namespace Octokit
/// The binary contents of the archive
Task GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference);
- ///
- /// Get an archive of a given repository's contents, in a specific format
- ///
- /// https://developer.github.com/v3/repos/contents/#get-archive-link
- /// The owner of the repository
- /// The name of the repository
- /// The format of the archive. Can be either tarball or zipball
- /// A valid Git reference.
- /// Timeout in minutes
- /// The binary contents of the archive
- Task GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, int timeout);
-
///
/// Get an archive of a given repository's contents, in a specific format
///
diff --git a/Octokit/Clients/RepositoryContentsClient.cs b/Octokit/Clients/RepositoryContentsClient.cs
index 0ef5ad92..3e350e3f 100644
--- a/Octokit/Clients/RepositoryContentsClient.cs
+++ b/Octokit/Clients/RepositoryContentsClient.cs
@@ -188,21 +188,6 @@ namespace Octokit
/// A valid Git reference.
/// The binary contents of the archive
public Task GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference)
- {
- return GetArchive(owner, name, archiveFormat, string.Empty, 60);
- }
-
- ///
- /// Get an archive of a given repository's contents, in a specific format
- ///
- /// https://developer.github.com/v3/repos/contents/#get-archive-link
- /// The owner of the repository
- /// The name of the repository
- /// The format of the archive. Can be either tarball or zipball
- /// A valid Git reference.
- /// Timeout in minutes
- /// The binary contents of the archive
- public Task GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, int timeout)
{
return GetArchive(owner, name, archiveFormat, string.Empty, TimeSpan.FromMinutes(60));
}
@@ -221,6 +206,7 @@ namespace Octokit
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.GreaterThanZero(timeout, "timeout");
var endpoint = ApiUrls.RepositoryArchiveLink(owner, name, archiveFormat, reference);