using System; using System.Reactive; namespace Octokit.Reactive { /// /// Client for accessing contents of files within a repository as base64 encoded content. /// public interface IObservableRepositoryContentsClient { /// /// Returns the HTML rendered README. /// /// The owner of the repository /// The name of the repository /// IObservable GetReadme(string owner, string name); /// /// Returns just the HTML portion of the README without the surrounding HTML document. /// /// The owner of the repository /// The name of the repository /// IObservable GetReadmeHtml(string owner, string name); /// /// Get an archive of a given repository's contents /// /// https://developer.github.com/v3/repos/contents/#get-archive-link /// The owner of the repository /// The name of the repository /// A promise, containing the binary contents of the archive IObservable GetArchive(string owner, string name); /// /// 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 promise, containing the binary contents of the archive IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat); /// /// Get an archive of a given repository's contents, using a specific format and reference /// /// 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. /// 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. /// Time span until timeout /// The binary contents of the archive IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, TimeSpan timeout); /// /// Returns the contents of a file or directory in a repository. /// /// /// If given a path to a single file, this method returns a collection containing only that file. /// /// The owner of the repository /// The name of the repository /// The content path /// /// A collection of representing the content at the specified path /// IObservable GetAllContents(string owner, string name, string path); /// /// Returns the contents of the root directory in a repository. /// /// The owner of the repository /// The name of the repository /// /// A collection of representing the content at the specified path /// IObservable GetAllContents(string owner, string name); /// /// Returns the contents of a file or directory in a repository. /// /// /// If given a path to a single file, this method returns a collection containing only that file. /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// The name of the commit/branch/tag. Default: the repository’s default branch (usually master) /// The content path /// /// A collection of representing the content at the specified path /// IObservable GetAllContentsByRef(string owner, string name, string reference, string path); /// /// Returns the contents of the home directory in a repository. /// /// The owner of the repository /// The name of the repository /// The name of the commit/branch/tag. Default: the repository’s default branch (usually master) /// /// A collection of representing the content at the specified path /// IObservable GetAllContentsByRef(string owner, string name, string reference); /// /// Creates a commit that creates a new file in a repository. /// /// The owner of the repository /// The name of the repository /// The path to the file /// Information about the file to create /// IObservable CreateFile(string owner, string name, string path, CreateFileRequest request); /// /// Creates a commit that updates the contents of a file in a repository. /// /// The owner of the repository /// The name of the repository /// The path to the file /// Information about the file to update /// The updated content IObservable UpdateFile(string owner, string name, string path, UpdateFileRequest request); /// /// Creates a commit that deletes a file in a repository. /// /// The owner of the repository /// The name of the repository /// The path to the file /// Information about the file to delete IObservable DeleteFile(string owner, string name, string path, DeleteFileRequest request); } }