mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-19 21:55:12 +00:00
add observable counter-parts
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reactive.Threading.Tasks;
|
||||
|
||||
namespace Octokit.Reactive.Clients
|
||||
@@ -29,6 +28,22 @@ namespace Octokit.Reactive.Clients
|
||||
return _client.Create(newRepository).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new repository in the specified organization.
|
||||
/// </summary>
|
||||
/// <param name="organizationLogin">The login of the organization in which to create the repostiory</param>
|
||||
/// <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(string organizationLogin, NewRepository newRepository)
|
||||
{
|
||||
Ensure.ArgumentNotNull(organizationLogin, "organizationLogin");
|
||||
Ensure.ArgumentNotNull(newRepository, "newRepository");
|
||||
if (string.IsNullOrEmpty(newRepository.Name))
|
||||
throw new ArgumentException("The new repository's name must not be null.");
|
||||
|
||||
return _client.Create(organizationLogin, newRepository).ToObservable();
|
||||
}
|
||||
|
||||
public IObservable<Repository> Get(string owner, string name)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
|
||||
Reference in New Issue
Block a user