Files
octokit.net/Octokit.Reactive/Clients/ObservableFeedsClient.cs
Itai Bar-Haim 4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +10:00

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();
}
}
}