diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs
index 0430c905..db97ac44 100644
--- a/Octokit/Clients/IssueCommentsClient.cs
+++ b/Octokit/Clients/IssueCommentsClient.cs
@@ -9,29 +9,98 @@ namespace Octokit
{
}
+ ///
+ /// Gets a single Issue Comment by number.
+ ///
+ ///
+ /// http://developer.github.com/v3/issues/comments/#get-a-single-comment
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The issue comment number
+ /// The s for the specified Issue Comment.
public Task Get(string owner, string name, int number)
{
- throw new System.NotImplementedException();
+ Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+
+ return ApiConnection.Get(ApiUrls.IssueComment(owner, name, number));
}
+ ///
+ /// Gets a list of the Issue Comments in a specified repository.
+ ///
+ ///
+ /// http://developer.github.com/v3/issues/comments/#list-comments-in-a-repository
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The list of s for the specified Repository.
public Task> GetForRepository(string owner, string name)
{
- throw new System.NotImplementedException();
+ Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+
+ return ApiConnection.GetAll(ApiUrls.IssueComments(owner, name));
}
+ ///
+ /// Gets a list of the Issue Comments for a specified issue.
+ ///
+ ///
+ /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The issue number
+ /// The list of s for the specified Issue.
public Task> GetForIssue(string owner, string name, int number)
{
- throw new System.NotImplementedException();
+
+ Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+
+ return ApiConnection.GetAll(ApiUrls.IssueComments(owner, name, number));
}
+ ///
+ /// Creates a new Issue Comment in the specified Issue
+ ///
+ ///
+ /// http://developer.github.com/v3/issues/comments/#create-a-comment
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The issue number
+ /// The text of the new comment
+ /// The s for that was just created.
public Task Create(string owner, string name, int number, string newComment)
{
- throw new System.NotImplementedException();
+ Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNull(newComment, "newComment");
+
+ return ApiConnection.Post(ApiUrls.IssueComment(owner, name, number), newComment);
}
+ ///
+ /// Updates a specified Issue Comment
+ ///
+ ///
+ /// http://developer.github.com/v3/issues/comments/#edit-a-comment
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The issue number
+ /// The text of the updated comment
+ /// The s for that was just updated.
public Task Update(string owner, string name, int number, string commentUpdate)
{
- throw new System.NotImplementedException();
+ Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNull(commentUpdate, "commentUpdate");
+
+ return ApiConnection.Patch(ApiUrls.IssueComment(owner, name, number), commentUpdate);
}
}
}