add observable counterparts

This commit is contained in:
half-ogre
2013-10-09 11:30:20 -07:00
parent 503959b27c
commit 35727b87a5
2 changed files with 26 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Reactive;
using System.Reactive.Threading.Tasks;
namespace Octokit.Reactive.Clients
@@ -44,6 +45,21 @@ namespace Octokit.Reactive.Clients
return _client.Create(organizationLogin, newRepository).ToObservable();
}
/// <summary>
/// Deletes a repository for the specified owner and name.
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <remarks>Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.</remarks>
/// <returns>An <see cref="IObservable{Unit}"/> for the operation</returns>
public IObservable<Unit> Delete(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
return _client.Delete(owner, name).ToObservable();
}
public IObservable<Repository> Get(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");