CommitCommentReactions() public static method

Returns the Uri for the reaction of a specified commit comment.
public static CommitCommentReactions ( long repositoryId, int number ) : Uri
repositoryId long The Id of the repository
number int The comment number
return System.Uri
Example #1
0
        /// <summary>
        /// Get all reactions for a specified Commit Comment
        /// </summary>
        /// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The comment id</param>
        /// <returns></returns>
        public Task <IReadOnlyList <Reaction> > GetAll(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.GetAll <Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), AcceptHeaders.ReactionsPreview));
        }
Example #2
0
        public Task <IReadOnlyList <Reaction> > GetAll(string owner, string name, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options));
        }
Example #3
0
        public Task <Reaction> Create(string owner, string name, int number, NewReaction reaction)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(reaction, nameof(reaction));

            return(ApiConnection.Post <Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), reaction, AcceptHeaders.ReactionsPreview));
        }
Example #4
0
        public Task <Reaction> Create(long repositoryId, int number, NewReaction reaction)
        {
            Ensure.ArgumentNotNull(reaction, nameof(reaction));

            return(ApiConnection.Post <Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), reaction, AcceptHeaders.ReactionsPreview));
        }
Example #5
0
        public Task <IReadOnlyList <Reaction> > GetAll(long repositoryId, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options));
        }
 /// <summary>
 /// Get all reactions for a specified Commit Comment
 /// </summary>
 /// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
 /// <param name="repositoryId">The owner of the repository</param>
 /// <param name="number">The comment id</param>
 /// <returns></returns>
 public Task <IReadOnlyList <Reaction> > GetAll(long repositoryId, int number)
 {
     return(ApiConnection.GetAll <Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), AcceptHeaders.ReactionsPreview));
 }