using System; using Octokit.Reactive.Internal; namespace Octokit.Reactive { public class ObservableNotificationsClient : IObservableNotificationsClient { readonly IConnection _connection; public ObservableNotificationsClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); _connection = client.Connection; } /// /// Retrieves all of the s for the current user. /// /// Thrown if the client is not authenticated. /// A of . public IObservable GetAllForCurrent() { return _connection.GetAndFlattenAllPages(ApiUrls.Notifications()); } /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// Thrown if the client is not authenticated. /// A of . public IObservable GetAllForRepository(string owner, string name) { return _connection.GetAndFlattenAllPages(ApiUrls.Notifications(owner, name)); } } }