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); /// /// 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 /// Location header to make a second GET request. /// Note: For private repositories, these links are temporary and expire quickly. /// /// https://developer.github.com/v3/repos/contents/#get-archive-link /// The owner of the repository /// The name of the repository /// [Obsolete("Use GetArchive to download the archive instead")] IObservable GetArchiveLink(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 IObservable GetArchive(string owner, string name); /// /// 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 /// Location header to make a second GET request. /// Note: For private repositories, these links are temporary and expire quickly. /// /// 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 /// [Obsolete("Use GetArchive to download the archive instead")] IObservable GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat); /// /// 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 /// IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat); /// /// 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 /// Location header to make a second GET request. /// Note: For private repositories, these links are temporary and expire quickly. /// /// 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. /// [Obsolete("Use GetArchive to download the archive instead")] IObservable GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference); /// /// 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. IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference); /// /// 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); /// /// 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); } }