using System; using System.Reactive; namespace Octokit.Reactive { /// /// Client for accessing contents of files within a repository as base64 encoded content. /// /// /// See the Repository Contents API documentation for more information. /// 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 the HTML rendered README. /// /// The ID of the repository IObservable GetReadme(int repositoryId); /// /// 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); /// /// Returns just the HTML portion of the README without the surrounding HTML document. /// /// The ID of the repository IObservable GetReadmeHtml(int repositoryId); /// /// 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); /// /// Get an archive of a given repository's contents /// /// https://developer.github.com/v3/repos/contents/#get-archive-link /// The ID of the repository IObservable GetArchive(int repositoryId); /// /// 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); /// /// Get an archive of a given repository's contents, in a specific format /// /// https://developer.github.com/v3/repos/contents/#get-archive-link /// The ID of the repository /// The format of the archive. Can be either tarball or zipball IObservable GetArchive(int repositoryId, 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. IObservable GetArchive(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 ID of the repository /// The format of the archive. Can be either tarball or zipball /// A valid Git reference. IObservable GetArchive(int repositoryId, 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 IObservable GetArchive(string owner, string name, ArchiveFormat archiveFormat, string reference, TimeSpan timeout); /// /// Get an archive of a given repository's contents, in a specific format /// /// https://developer.github.com/v3/repos/contents/#get-archive-link /// The ID of the repository /// The format of the archive. Can be either tarball or zipball /// A valid Git reference. /// Time span until timeout IObservable GetArchive(int repositoryId, 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 IObservable GetAllContents(string owner, string name, string path); /// /// 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 ID of the repository /// The content path IObservable GetAllContents(int repositoryId, string path); /// /// Returns the contents of the root directory in a repository. /// /// The owner of the repository /// The name of the repository IObservable GetAllContents(string owner, string name); /// /// Returns the contents of the root directory in a repository. /// /// The ID of the repository IObservable GetAllContents(int repositoryId); /// /// 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 IObservable GetAllContentsByRef(string owner, string name, string reference, string path); /// /// 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 ID of the repository /// The name of the commit/branch/tag. Default: the repository’s default branch (usually master) /// The content path IObservable GetAllContentsByRef(int repositoryId, 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) IObservable GetAllContentsByRef(string owner, string name, string reference); /// /// Returns the contents of the home directory in a repository. /// /// The ID of the repository /// The name of the commit/branch/tag. Default: the repository’s default branch (usually master) IObservable GetAllContentsByRef(int repositoryId, 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 creates a new file in a repository. /// /// The ID of the repository /// The path to the file /// Information about the file to create IObservable CreateFile(int repositoryId, 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 IObservable UpdateFile(string owner, string name, string path, UpdateFileRequest request); /// /// Creates a commit that updates the contents of a file in a repository. /// /// The ID of the repository /// The path to the file /// Information about the file to update IObservable UpdateFile(int repositoryId, 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); /// /// Creates a commit that deletes a file in a repository. /// /// The ID of the repository /// The path to the file /// Information about the file to delete IObservable DeleteFile(int repositoryId, string path, DeleteFileRequest request); } }