mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
introduce GetArchive overloads for RepositoryContentClients which handles the redirect
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit.Internal;
|
||||
@@ -57,8 +58,18 @@ namespace Octokit
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use GetArchive to download the archive instead")]
|
||||
Task<string> GetArchiveLink(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
Task<byte[]> GetArchive(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// This method will return a 302 to a URL to download a tarball or zipball archive for a repository.
|
||||
/// Please make sure your HTTP framework is configured to follow redirects or you will need to use the
|
||||
@@ -70,8 +81,19 @@ namespace Octokit
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use GetArchive to download the archive instead")]
|
||||
Task<string> GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents, in a specific format
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
|
||||
/// <returns></returns>
|
||||
Task<byte[]> GetArchive(string owner, string name, ArchiveFormat archiveFormat);
|
||||
|
||||
/// <summary>
|
||||
/// This method will return a 302 to a URL to download a tarball or zipball archive for a repository.
|
||||
/// Please make sure your HTTP framework is configured to follow redirects or you will need to use the
|
||||
@@ -84,8 +106,20 @@ namespace Octokit
|
||||
/// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
|
||||
/// <param name="reference">A valid Git reference.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Use GetArchive to download the archive instead")]
|
||||
Task<string> GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents, using a specific format and reference
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/repos/contents/#get-archive-link</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
|
||||
/// <param name="reference">A valid Git reference.</param>
|
||||
/// <returns></returns>
|
||||
Task<byte[]> GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that creates a new file in a repository.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user