using System; using System.Diagnostics.CodeAnalysis; using System.Reactive; namespace Octokit.Reactive { /// /// A client for GitHub's Activity Notifications API. /// /// /// See the Activity Notifications API documentation for more information. /// public interface IObservableNotificationsClient { /// /// Retrieves all of the s for the current user. /// /// Thrown if the client is not authenticated. /// [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] IObservable GetAllForCurrent(); /// /// Retrieves all of the s for the current user. /// /// Options for changing the API response /// Thrown if the client is not authenticated. /// [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] IObservable GetAllForCurrent(ApiOptions options); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The owner of the repository. /// The name of the repository. /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(string owner, string name); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The ID of the repository. /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(int repositoryId); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The owner of the repository. /// The name of the repository. /// Options for changing the API response /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(string owner, string name, ApiOptions options); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The ID of the repository. /// Options for changing the API response /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(int repositoryId, ApiOptions options); /// /// Retrieves all of the s for the current user. /// /// Specifies the parameters to filter notifications by /// Thrown if the client is not authenticated. /// [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] IObservable GetAllForCurrent(NotificationsRequest request); /// /// Retrieves all of the s for the current user. /// /// Specifies the parameters to filter notifications by /// Options for changing the API response /// Thrown if the client is not authenticated. /// [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] IObservable GetAllForCurrent(NotificationsRequest request, ApiOptions options); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The owner of the repository. /// The name of the repository. /// Specifies the parameters to filter notifications by /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(string owner, string name, NotificationsRequest request); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The ID of the repository. /// Specifies the parameters to filter notifications by /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(int repositoryId, NotificationsRequest request); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The owner of the repository. /// The name of the repository. /// Specifies the parameters to filter notifications by /// Options for changing the API response /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(string owner, string name, NotificationsRequest request, ApiOptions options); /// /// Retrieves all of the s for the current user specific to the specified repository. /// /// The ID of the repository. /// Specifies the parameters to filter notifications by /// Options for changing the API response /// Thrown if the client is not authenticated. /// IObservable GetAllForRepository(int repositoryId, NotificationsRequest request, ApiOptions options); /// /// Marks all notifications as read. /// /// http://developer.github.com/v3/activity/notifications/#mark-as-read /// IObservable MarkAsRead(); /// /// Marks all notifications as read. /// /// The parameter which specifies which notifications to mark. /// http://developer.github.com/v3/activity/notifications/#mark-as-read /// IObservable MarkAsRead(MarkAsReadRequest markAsReadRequest); /// /// Marks the notifications for a given repository as read. /// /// The owner of the repository /// The name of the repository /// http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository /// IObservable MarkAsReadForRepository(string owner, string name); /// /// Marks the notifications for a given repository as read. /// /// The ID of the repository /// http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository /// IObservable MarkAsReadForRepository(int repositoryId); /// /// Marks the notifications for a given repository as read. /// /// The owner of the repository /// The name of the repository /// The parameter which specifies which notifications to mark. /// http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository /// IObservable MarkAsReadForRepository(string owner, string name, MarkAsReadRequest markAsReadRequest); /// /// Marks the notifications for a given repository as read. /// /// The ID of the repository /// The parameter which specifies which notifications to mark. /// http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository /// IObservable MarkAsReadForRepository(int repositoryId, MarkAsReadRequest markAsReadRequest); /// /// Retrives a single by Id. /// /// The Id of the notification to retrieve. /// http://developer.github.com/v3/activity/notifications/#view-a-single-thread /// [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")] IObservable Get(int id); /// /// Marks a single notification as read. /// /// The id of the notification. /// http://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read /// IObservable MarkAsRead(int id); /// /// Retrives a for the provided thread id. /// /// The Id of the thread to retrieve subscription status. /// http://developer.github.com/v3/activity/notifications/#get-a-thread-subscription /// IObservable GetThreadSubscription(int id); /// /// Sets the authenticated user's subscription settings for a given thread. /// /// The Id of the thread to update. /// The subscription parameters to set. /// http://developer.github.com/v3/activity/notifications/#set-a-thread-subscription /// IObservable SetThreadSubscription(int id, NewThreadSubscription threadSubscription); /// /// Deletes the authenticated user's subscription to a given thread. /// /// The Id of the thread to delete subscription from. /// http://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription /// IObservable DeleteThreadSubscription(int id); } }