Notifications() public static méthode

Returns the Uri that returns all of the notifications for the currently logged in user.
public static Notifications ( ) : Uri
Résultat System.Uri
        /// <summary>
        /// Retrieves all of the <see cref="Notification"/>s for the current user.
        /// </summary>
        /// <param name="request">Specifies the parameters to filter notifications by</param>
        /// <param name="options">Options for changing the API response</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        public Task <IReadOnlyList <Notification> > GetAllForCurrent(NotificationsRequest request, ApiOptions options)
        {
            Ensure.ArgumentNotNull(request, "request");
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(), request.ToParametersDictionary(), options));
        }
Exemple #2
0
        /// <summary>
        /// Retrieves all of the <see cref="Notification"/>s for the current user specific to the specified repository.
        /// </summary>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <returns>A <see cref="IReadOnlyPagedCollection{Notification}"/> of <see cref="Notification"/>.</returns>
        public Task <IReadOnlyList <Notification> > GetAllForRepository(string owner, string name)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(owner, name)));
        }
        /// <summary>
        /// Marks the notifications for a given repository as read.
        /// </summary>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository</remarks>
        public Task MarkAsReadForRepository(string owner, string name)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Put(ApiUrls.Notifications(owner, name)));
        }
        public Task MarkAsReadForRepository(string owner, string name)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));

            return(ApiConnection.Put <object>(ApiUrls.Notifications(owner, name), new object()));
        }
        public Task <IReadOnlyList <Notification> > GetAllForRepository(long repositoryId, NotificationsRequest request, ApiOptions options)
        {
            Ensure.ArgumentNotNull(request, nameof(request));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(repositoryId), request.ToParametersDictionary(), options));
        }
        /// <summary>
        /// Marks the notifications for a given repository as read.
        /// </summary>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="markAsReadRequest">The <see cref="MarkAsReadRequest"/> parameter which specifies which notifications to mark.</param>
        /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository</remarks>
        public Task MarkAsReadForRepository(string owner, string name, MarkAsReadRequest markAsReadRequest)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(markAsReadRequest, "markAsReadRequest");

            return(ApiConnection.Put <object>(ApiUrls.Notifications(owner, name), markAsReadRequest));
        }
Exemple #7
0
        /// <summary>
        /// Retrieves all of the <see cref="Notification"/>s for the current user specific to the specified repository.
        /// </summary>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <returns>A <see cref="IReadOnlyPagedCollection{Notification}"/> of <see cref="Notification"/>.</returns>
        public Task <IReadOnlyList <Notification> > GetAllForRepository(string owner, string name, NotificationsRequest request)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(request, "request");

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(owner, name), request.ToParametersDictionary()));
        }
        public Task <IReadOnlyList <Notification> > GetAllForRepository(string owner, string name, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(owner, name), options));
        }
        /// <summary>
        /// Retrieves all of the <see cref="Notification"/>s for the current user specific to the specified repository.
        /// </summary>
        /// <param name="repositoryId">The Id of the repository.</param>
        /// <param name="options">Options for changing the API response</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        public Task <IReadOnlyList <Notification> > GetAllForRepository(int repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(repositoryId), options));
        }
        /// <summary>
        /// Retrieves all of the <see cref="Notification"/>s for the current user.
        /// </summary>
        /// <param name="options">Options for changing the API response</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        public Task <IReadOnlyList <Notification> > GetAllForCurrent(ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(), options));
        }
        /// <summary>
        /// Marks the notifications for a given repository as read.
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="markAsReadRequest">The <see cref="MarkAsReadRequest"/> parameter which specifies which notifications to mark.</param>
        /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository</remarks>
        public Task MarkAsReadForRepository(int repositoryId, MarkAsReadRequest markAsReadRequest)
        {
            Ensure.ArgumentNotNull(markAsReadRequest, "markAsReadRequest");

            return(ApiConnection.Put <object>(ApiUrls.Notifications(repositoryId), markAsReadRequest));
        }
 /// <summary>
 /// Marks the notifications for a given repository as read.
 /// </summary>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository</remarks>
 public Task MarkAsReadForRepository(int repositoryId)
 {
     return(ApiConnection.Put(ApiUrls.Notifications(repositoryId)));
 }
        /// <summary>
        /// Marks all notifications as read.
        /// </summary>
        /// <param name="markAsReadRequest">The <see cref="MarkAsReadRequest"/> parameter which specifies which notifications to mark.</param>
        /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-as-read</remarks>
        public Task MarkAsRead(MarkAsReadRequest markAsReadRequest)
        {
            Ensure.ArgumentNotNull(markAsReadRequest, "markAsReadRequest");

            return(ApiConnection.Put <object>(ApiUrls.Notifications(), markAsReadRequest));
        }
Exemple #14
0
 /// <summary>
 /// Retrieves all of the <see cref="Notification"/>s for the current user.
 /// </summary>
 /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
 /// <returns>A <see cref="IReadOnlyPagedCollection{Notification}"/> of <see cref="Notification"/>.</returns>
 public Task <IReadOnlyList <Notification> > GetAllForCurrent()
 {
     return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications()));
 }
 public Task MarkAsReadForRepository(long repositoryId)
 {
     return(ApiConnection.Put <object>(ApiUrls.Notifications(repositoryId), new object()));
 }
 public Task MarkAsRead()
 {
     return(ApiConnection.Put <object>(ApiUrls.Notifications(), new object()));
 }
Exemple #17
0
 /// <summary>
 /// Marks all notifications as read.
 /// </summary>
 /// <param name="markAsReadRequest">The <see cref="MarkAsReadRequest"/> parameter which specifies which notifications to mark.</param>
 /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-as-read</remarks>
 /// <returns></returns>
 public Task MarkAsRead(MarkAsReadRequest markAsReadRequest)
 {
     return(ApiConnection.Put <object>(ApiUrls.Notifications(), markAsReadRequest));
 }
Exemple #18
0
 /// <summary>
 /// Retrieves all of the <see cref="Notification"/>s for the current user specific to the specified repository.
 /// </summary>
 /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
 /// <returns>A <see cref="IReadOnlyPagedCollection{Notification}"/> of <see cref="Notification"/>.</returns>
 public Task <IReadOnlyList <Notification> > GetAllForRepository(string owner, string name)
 {
     return(ApiConnection.GetAll <Notification>(ApiUrls.Notifications(owner, name)));
 }
 /// <summary>
 /// Marks all notifications as read.
 /// </summary>
 /// <remarks>http://developer.github.com/v3/activity/notifications/#mark-as-read</remarks>
 public Task MarkAsRead()
 {
     return(ApiConnection.Put(ApiUrls.Notifications()));
 }