mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 06:05:12 +00:00
Add repositoryId overloads to methods on I(Observable)RepositoryContentsClient (#1348)
This commit is contained in:
committed by
Brendan Forster
parent
6bd1f06962
commit
d941f62904
@@ -6,6 +6,9 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Client for accessing contents of files within a repository as base64 encoded content.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/contents/">Repository Contents API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public interface IObservableRepositoryContentsClient
|
||||
{
|
||||
/// <summary>
|
||||
@@ -13,16 +16,26 @@ namespace Octokit.Reactive
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
IObservable<Readme> GetReadme(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the HTML rendered README.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
IObservable<Readme> GetReadme(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns just the HTML portion of the README without the surrounding HTML document.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
IObservable<string> GetReadmeHtml(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Returns just the HTML portion of the README without the surrounding HTML document.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
IObservable<string> GetReadmeHtml(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents
|
||||
@@ -30,9 +43,15 @@ namespace Octokit.Reactive
|
||||
/// <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>A promise, containing the binary contents of the archive</returns>
|
||||
IObservable<byte[]> GetArchive(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="repositoryId">The ID of the repository</param>
|
||||
IObservable<byte[]> GetArchive(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents, in a specific format
|
||||
/// </summary>
|
||||
@@ -40,9 +59,16 @@ namespace Octokit.Reactive
|
||||
/// <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>A promise, containing the binary contents of the archive</returns>
|
||||
IObservable<byte[]> GetArchive(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="repositoryId">The ID of the repository</param>
|
||||
/// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
|
||||
IObservable<byte[]> GetArchive(int repositoryId, ArchiveFormat archiveFormat);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents, using a specific format and reference
|
||||
/// </summary>
|
||||
@@ -51,9 +77,17 @@ namespace Octokit.Reactive
|
||||
/// <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>A promise, containing the binary contents of the archive</returns>
|
||||
IObservable<byte[]> GetArchive(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="repositoryId">The ID 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>
|
||||
IObservable<byte[]> GetArchive(int repositoryId, ArchiveFormat archiveFormat, string reference);
|
||||
|
||||
/// <summary>
|
||||
/// Get an archive of a given repository's contents, in a specific format
|
||||
/// </summary>
|
||||
@@ -63,9 +97,18 @@ namespace Octokit.Reactive
|
||||
/// <param name="archiveFormat">The format of the archive. Can be either tarball or zipball</param>
|
||||
/// <param name="reference">A valid Git reference.</param>
|
||||
/// <param name="timeout"> Time span until timeout </param>
|
||||
/// <returns>The binary contents of the archive</returns>
|
||||
IObservable<byte[]> GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, TimeSpan timeout);
|
||||
|
||||
/// <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="repositoryId">The ID 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>
|
||||
/// <param name="timeout"> Time span until timeout </param>
|
||||
IObservable<byte[]> GetArchive(int repositoryId, ArchiveFormat archiveFormat, string reference, TimeSpan timeout);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of a file or directory in a repository.
|
||||
/// </summary>
|
||||
@@ -75,21 +118,31 @@ namespace Octokit.Reactive
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="path">The content path</param>
|
||||
/// <returns>
|
||||
/// A collection of <see cref="RepositoryContent"/> representing the content at the specified path
|
||||
/// </returns>
|
||||
IObservable<RepositoryContent> GetAllContents(string owner, string name, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of a file or directory in a repository.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If given a path to a single file, this method returns a collection containing only that file.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="path">The content path</param>
|
||||
IObservable<RepositoryContent> GetAllContents(int repositoryId, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of the root directory in a repository.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns>
|
||||
/// A collection of <see cref="RepositoryContent"/> representing the content at the specified path
|
||||
/// </returns>
|
||||
IObservable<RepositoryContent> GetAllContents(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of the root directory in a repository.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
IObservable<RepositoryContent> GetAllContents(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of a file or directory in a repository.
|
||||
/// </summary>
|
||||
@@ -101,23 +154,35 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The name of the commit/branch/tag. Default: the repository’s default branch (usually master)</param>
|
||||
/// <param name="path">The content path</param>
|
||||
/// <returns>
|
||||
/// A collection of <see cref="RepositoryContent"/> representing the content at the specified path
|
||||
/// </returns>
|
||||
IObservable<RepositoryContent> GetAllContentsByRef(string owner, string name, string reference, string path);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of a file or directory in a repository.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If given a path to a single file, this method returns a collection containing only that file.
|
||||
/// See the <a href="https://developer.github.com/v3/repos/contents/#get-contents">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="reference">The name of the commit/branch/tag. Default: the repository’s default branch (usually master)</param>
|
||||
/// <param name="path">The content path</param>
|
||||
IObservable<RepositoryContent> GetAllContentsByRef(int repositoryId, string reference, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of the home directory in a repository.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The name of the commit/branch/tag. Default: the repository’s default branch (usually master)</param>
|
||||
/// <returns>
|
||||
/// A collection of <see cref="RepositoryContent"/> representing the content at the specified path
|
||||
/// </returns>
|
||||
IObservable<RepositoryContent> GetAllContentsByRef(string owner, string name, string reference);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the contents of the home directory in a repository.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="reference">The name of the commit/branch/tag. Default: the repository’s default branch (usually master)</param>
|
||||
IObservable<RepositoryContent> GetAllContentsByRef(int repositoryId, string reference);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that creates a new file in a repository.
|
||||
/// </summary>
|
||||
@@ -125,9 +190,16 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="path">The path to the file</param>
|
||||
/// <param name="request">Information about the file to create</param>
|
||||
/// <returns></returns>
|
||||
IObservable<RepositoryContentChangeSet> CreateFile(string owner, string name, string path, CreateFileRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that creates a new file in a repository.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="path">The path to the file</param>
|
||||
/// <param name="request">Information about the file to create</param>
|
||||
IObservable<RepositoryContentChangeSet> CreateFile(int repositoryId, string path, CreateFileRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that updates the contents of a file in a repository.
|
||||
/// </summary>
|
||||
@@ -135,9 +207,16 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="path">The path to the file</param>
|
||||
/// <param name="request">Information about the file to update</param>
|
||||
/// <returns>The updated content</returns>
|
||||
IObservable<RepositoryContentChangeSet> UpdateFile(string owner, string name, string path, UpdateFileRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that updates the contents of a file in a repository.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="path">The path to the file</param>
|
||||
/// <param name="request">Information about the file to update</param>
|
||||
IObservable<RepositoryContentChangeSet> UpdateFile(int repositoryId, string path, UpdateFileRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that deletes a file in a repository.
|
||||
/// </summary>
|
||||
@@ -146,5 +225,13 @@ namespace Octokit.Reactive
|
||||
/// <param name="path">The path to the file</param>
|
||||
/// <param name="request">Information about the file to delete</param>
|
||||
IObservable<Unit> DeleteFile(string owner, string name, string path, DeleteFileRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a commit that deletes a file in a repository.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="path">The path to the file</param>
|
||||
/// <param name="request">Information about the file to delete</param>
|
||||
IObservable<Unit> DeleteFile(int repositoryId, string path, DeleteFileRequest request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user