mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
Added XML documentation to public methods
This commit is contained in:
@@ -9,6 +9,13 @@ namespace Octokit
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single comment by gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#get-a-single-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <returns>Task{GistComment}.</returns>
|
||||
public Task<GistComment> Get(string gistId, string commentId)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
|
||||
@@ -17,6 +24,12 @@ namespace Octokit
|
||||
return ApiConnection.Get<GistComment>(ApiUrls.GistComment(gistId, commentId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all comments for the gist with the specified id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <returns>Task{IReadOnlyList{GistComment}}.</returns>
|
||||
public Task<IReadOnlyList<GistComment>> GetForGist(string gistId)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
|
||||
@@ -24,6 +37,13 @@ namespace Octokit
|
||||
return ApiConnection.GetAll<GistComment>(ApiUrls.GistComments(gistId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a comment for the gist with the specified id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#create-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="comment">The body of the comment</param>
|
||||
/// <returns>Task{GistComment}.</returns>
|
||||
public Task<GistComment> Create(string gistId, string comment)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
|
||||
@@ -32,6 +52,14 @@ namespace Octokit
|
||||
return ApiConnection.Post<GistComment>(ApiUrls.GistComments(gistId), comment);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the comment with the specified gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#edit-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <param name="comment">The updated body of the comment</param>
|
||||
/// <returns>Task{GistComment}.</returns>
|
||||
public Task<GistComment> Update(string gistId, string commentId, string comment)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
|
||||
@@ -41,6 +69,13 @@ namespace Octokit
|
||||
return ApiConnection.Patch<GistComment>(ApiUrls.GistComment(gistId, commentId), comment);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the comment with the specified gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#delete-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <returns>Task.</returns>
|
||||
public Task Delete(string gistId, string commentId)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
|
||||
|
||||
@@ -6,12 +6,51 @@ namespace Octokit
|
||||
{
|
||||
public interface IGistCommentsClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a single comment by gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#get-a-single-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <returns>Task{GistComment}.</returns>
|
||||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||
Justification = "Method makes a network request")]
|
||||
Task<GistComment> Get(string gistId, string commentId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all comments for the gist with the specified id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <returns>Task{IReadOnlyList{GistComment}}.</returns>
|
||||
Task<IReadOnlyList<GistComment>> GetForGist(string gistId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a comment for the gist with the specified id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#create-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="comment">The body of the comment</param>
|
||||
/// <returns>Task{GistComment}.</returns>
|
||||
Task<GistComment> Create(string gistId, string comment);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the comment with the specified gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#edit-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <param name="comment">The updated body of the comment</param>
|
||||
/// <returns>Task{GistComment}.</returns>
|
||||
Task<GistComment> Update(string gistId, string commentId, string comment);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the comment with the specified gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#delete-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task Delete(string gistId, string commentId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user