add reactive counter-part

This commit is contained in:
half-ogre
2013-10-08 09:43:52 -07:00
parent 9a3e94ac82
commit 13dbfea583
2 changed files with 21 additions and 0 deletions

View File

@@ -15,6 +15,20 @@ namespace Octokit.Reactive.Clients
_client = client;
}
/// <summary>
/// Creates a new repository for the current user.
/// </summary>
/// <param name="newRepository">A <see cref="NewRepository"/> instance describing the new repository to create</param>
/// <returns>An <see cref="IObservable{Repository}"/> instance for the created repository</returns>
public IObservable<Repository> Create(NewRepository newRepository)
{
Ensure.ArgumentNotNull(newRepository, "newRepository");
if (string.IsNullOrEmpty(newRepository.Name))
throw new ArgumentException("The new repository's name must not be null.");
return _client.Create(newRepository).ToObservable();
}
public IObservable<Repository> Get(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");

View File

@@ -6,6 +6,13 @@ namespace Octokit.Reactive
{
public interface IObservableRepositoriesClient
{
/// <summary>
/// Creates a new repository for the current user.
/// </summary>
/// <param name="newRepository">A <see cref="NewRepository"/> instance describing the new repository to create</param>
/// <returns>An <see cref="IObservable{Repository}"/> instance for the created repository</returns>
IObservable<Repository> Create(NewRepository newRepository);
/// <summary>
/// Retrieves the <see cref="Repository"/> for the specified owner and name.
/// </summary>