Interface GistComment

All Superinterfaces:
Comparable<GistComment>, JsonPatchable, JsonReadable
All Known Implementing Classes:
GistComment.Smart

@Immutable public interface GistComment extends Comparable<GistComment>, JsonReadable, JsonPatchable
Gist comment.

Gist 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 GistComment.Smart(comment).author().login();
Since:
0.8
See Also:
Suppressed Checkstyle violations:
MultipleStringLiterals (500 lines)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Smart comment with additional features.
  • Method Summary

    Modifier and Type
    Method
    Description
    The gist it's in.
    int
    Number.
    void
    Delete the comment.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface com.jcabi.github.JsonPatchable

    patch

    Methods inherited from interface com.jcabi.github.JsonReadable

    json
  • Method Details

    • gist

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

      int number()
      Number.
      Returns:
      Comment id
    • remove

      void remove() throws IOException
      Delete the comment.
      Throws:
      IOException - If there is any I/O problem