mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
* #2927: comment id model update to long instead of int * #2927: code review fixes (1) * #2927: code review fixes (2) * #2927: comment id model update to long instead of int: unit tests fix * #2927: code review fixes * Fixed most names of parameters --------- Co-authored-by: Victor Vorobyev <victor@myrtle-sa.com> Co-authored-by: Brian C. Arnold <brian.arnold@spiderrock.net>
72 lines
3.3 KiB
C#
72 lines
3.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Gist Comments API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/gists/comments/">Gist Comments API documentation</a> for more information.
|
|
/// </remarks>
|
|
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, long 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>> GetAllForGist(string gistId);
|
|
|
|
/// <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>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
/// <returns>Task{IReadOnlyList{GistComment}}.</returns>
|
|
Task<IReadOnlyList<GistComment>> GetAllForGist(string gistId, ApiOptions options);
|
|
|
|
/// <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, long 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, long commentId);
|
|
}
|
|
}
|