IssueComment() public static method

Returns the Uri for the specified comment.
public static IssueComment ( long repositoryId, int id ) : Uri
repositoryId long The Id of the repository
id int The comment id
return System.Uri
Exemplo n.º 1
0
        /// <summary>
        /// Deletes the specified Issue Comment
        /// </summary>
        /// <remarks>http://developer.github.com/v3/issues/comments/#delete-a-comment</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="id">The comment id</param>
        public Task Delete(string owner, string name, int id)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Delete(ApiUrls.IssueComment(owner, name, id)));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets a single Issue Comment by id.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/issues/comments/#get-a-single-comment</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="id">The issue comment id</param>
        public Task <IssueComment> Get(string owner, string name, int id)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Get <IssueComment>(ApiUrls.IssueComment(owner, name, id), null, AcceptHeaders.ReactionsPreview));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets a single Issue Comment by number.
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/issues/comments/#get-a-single-comment
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The issue comment number</param>
        /// <returns>The <see cref="IssueComment"/>s for the specified Issue Comment.</returns>
        public Task <IssueComment> Get(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Get <IssueComment>(ApiUrls.IssueComment(owner, name, number)));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Updates a specified Issue Comment.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/issues/comments/#edit-a-comment</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="id">The comment id</param>
        /// <param name="commentUpdate">The modified comment</param>
        public Task <IssueComment> Update(string owner, string name, int id, string commentUpdate)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(commentUpdate, "commentUpdate");

            return(ApiConnection.Patch <IssueComment>(ApiUrls.IssueComment(owner, name, id), new BodyWrapper(commentUpdate)));
        }
Exemplo n.º 5
0
 /// <summary>
 /// Gets a single Issue Comment by id.
 /// </summary>
 /// <remarks>http://developer.github.com/v3/issues/comments/#get-a-single-comment</remarks>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <param name="id">The issue comment id</param>
 public Task <IssueComment> Get(long repositoryId, int id)
 {
     return(ApiConnection.Get <IssueComment>(ApiUrls.IssueComment(repositoryId, id), null, AcceptHeaders.ReactionsPreview));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Deletes the specified Issue Comment
 /// </summary>
 /// <remarks>http://developer.github.com/v3/issues/comments/#delete-a-comment</remarks>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <param name="id">The comment id</param>
 public Task Delete(long repositoryId, int id)
 {
     return(ApiConnection.Delete(ApiUrls.IssueComment(repositoryId, id)));
 }
Exemplo n.º 7
0
        /// <summary>
        /// Updates a specified Issue Comment.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/issues/comments/#edit-a-comment</remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="id">The comment id</param>
        /// <param name="commentUpdate">The modified comment</param>
        public Task <IssueComment> Update(long repositoryId, int id, string commentUpdate)
        {
            Ensure.ArgumentNotNull(commentUpdate, "commentUpdate");

            return(ApiConnection.Patch <IssueComment>(ApiUrls.IssueComment(repositoryId, id), new BodyWrapper(commentUpdate)));
        }