Package com.spotify.github.v3.clients
Class IssueClient
- java.lang.Object
-
- com.spotify.github.v3.clients.IssueClient
-
public class IssueClient extends Object
Issue API client
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Comment>createComment(int number, String body)Create a comment for a given issue number.CompletableFuture<CommentReaction>createCommentReaction(long commentId, CommentReactionContent reaction)Create a reaction on a comment.CompletableFuture<Void>deleteComment(int id)Delete a comment.CompletableFuture<okhttp3.Response>deleteCommentReaction(long issueNumber, long reactionId)Delete a reaction on a comment.CompletableFuture<Void>editComment(int id, String body)Edit a specific comment.CompletableFuture<Comment>getComment(int id)Get a specific comment.CompletableFuture<Issue>getIssue(int id)Get issue by idGithubPageIterator<CommentReaction>listCommentReaction(long commentId)List reactions on a comment.Iterator<AsyncPage<Comment>>listComments()List repository comments.Iterator<AsyncPage<Comment>>listComments(int number)List given issue number comments.
-
-
-
Method Detail
-
listComments
public Iterator<AsyncPage<Comment>> listComments()
List repository comments.- Returns:
- comments
-
listComments
public Iterator<AsyncPage<Comment>> listComments(int number)
List given issue number comments.- Parameters:
number- issue number- Returns:
- comments
-
getComment
public CompletableFuture<Comment> getComment(int id)
Get a specific comment.- Parameters:
id- comment id- Returns:
- a comment
-
createComment
public CompletableFuture<Comment> createComment(int number, String body)
Create a comment for a given issue number.- Parameters:
number- issue numberbody- comment content- Returns:
- the Comment that was just created
-
editComment
public CompletableFuture<Void> editComment(int id, String body)
Edit a specific comment.- Parameters:
id- comment idbody- new comment content
-
deleteComment
public CompletableFuture<Void> deleteComment(int id)
Delete a comment.- Parameters:
id- comment id
-
getIssue
public CompletableFuture<Issue> getIssue(int id)
Get issue by id- Parameters:
id- issue id- Returns:
- the Issue for the given id if exists.
-
createCommentReaction
public CompletableFuture<CommentReaction> createCommentReaction(long commentId, CommentReactionContent reaction)
Create a reaction on a comment. See Create reaction for an issue comment- Parameters:
commentId- comment idreaction- reaction content- Returns:
- the Comment that was just created
-
deleteCommentReaction
public CompletableFuture<okhttp3.Response> deleteCommentReaction(long issueNumber, long reactionId)
Delete a reaction on a comment. See List reactions for an issue comment- Parameters:
issueNumber- issue numberreactionId- reaction id
-
listCommentReaction
public GithubPageIterator<CommentReaction> listCommentReaction(long commentId)
List reactions on a comment. See List reactions for an issue comment- Parameters:
commentId- comment id- Returns:
- reactions
-
-