using System;
using System.Collections.Generic;
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
///
IObservable GetArchiveLink(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
///
IObservable GetArchiveLink(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.
///
IObservable GetArchiveLink(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);
///
/// 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 content path
/// 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 GetContents(string owner, string name, string path, 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);
}
}