Interface Comment

  • All Superinterfaces:
    Comparable<Comment>, JsonPatchable, JsonReadable
    All Known Implementing Classes:
    Comment.Smart, SfComment

    @Immutable
    public interface Comment
    extends Comparable<Comment>, JsonReadable, JsonPatchable
    Github issue comment.

    Comment implements JsonReadable, that's how you can get its full details in JSON format. For example, to get its author's Github login you get the entire JSON and then gets its element:

    String login = comment.json()
       .getJsonObject("user")
       .getString("login");

    However, it's better to use a supplementary "smart" decorator, which automates most of these operations:

    String login = new Comment.Smart(comment).author().login();
    Since:
    0.1
    Version:
    $Id: aba3655ac08357e80033ec3eaa98ac7a6761a151 $
    Author:
    Yegor Bugayenko (yegor256@gmail.com), Paulo Lobo (pauloeduardolobo@gmail.com)
    See Also:
    Issue Comments API
    Suppressed Checkstyle violations:
    MultipleStringLiterals (500 lines)
    • Method Detail

      • issue

        Issue issue()
        The issue it's in.
        Returns:
        Owner of the comment
      • number

        int number()
        Number.
        Returns:
        Comment number
      • react

        void react​(Reaction reaction)
            throws IOException
        Adds the reaction to the comment.
        Parameters:
        reaction - Reaction to be added.
        Throws:
        IOException - In case something goes wrong.
      • reactions

        Iterable<Reaction> reactions()
        List the reactions of the comment.
        Returns:
        Comment reactions.