mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 14:15:12 +00:00
add observable counterparts
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user