mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-30 18:01:14 +00:00
4e804f61a6
* updated XML docs and added some missing bits. * prefer nameof(x) over literal "x"
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using System;
|
|
using System.Reactive.Threading.Tasks;
|
|
|
|
namespace Octokit.Reactive
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Feeds API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/activity/feeds/">Feeds API documentation</a> for more information
|
|
/// </remarks>
|
|
public class ObservableFeedsClient : IObservableFeedsClient
|
|
{
|
|
readonly IFeedsClient _client;
|
|
|
|
public ObservableFeedsClient(IGitHubClient client)
|
|
{
|
|
Ensure.ArgumentNotNull(client, nameof(client));
|
|
|
|
_client = client.Activity.Feeds;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets all the feeds available to the authenticating user
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// http://developer.github.com/v3/activity/feeds/#list-feeds
|
|
/// </remarks>
|
|
/// <returns>All the public <see cref="Feed"/>s for the particular user.</returns>
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
|
public IObservable<Feed> GetFeeds()
|
|
{
|
|
return _client.GetFeeds().ToObservable();
|
|
}
|
|
}
|
|
} |