mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 03:55:55 +00:00
Include RX client
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Reactive;
|
||||
|
||||
@@ -98,5 +99,14 @@ namespace Octokit.Reactive
|
||||
/// that announced this feature.
|
||||
/// </remarks>
|
||||
IObservableCommitStatusClient CommitStatus { get; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of hooks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#json-http">API documentation</a> for more information.</remarks>
|
||||
/// <returns></returns>
|
||||
IObservable<IReadOnlyList<RepositoryHook>> GetHooks(string owner, string repositoryName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reactive;
|
||||
using System.Reactive.Threading.Tasks;
|
||||
using Octokit.Reactive.Internal;
|
||||
@@ -108,5 +109,14 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
public IObservableCommitStatusClient CommitStatus { get; private set; }
|
||||
|
||||
|
||||
public IObservable<IReadOnlyList<RepositoryHook>> GetHooks(string owner, string repositoryName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
|
||||
return _client.GetHooks(owner, repositoryName).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user