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
    Version:
    $Id: e6b015cf5b84dfcaa2c9d49a688cddf4f48e3f38 $
    Author:
    Giang Le (giang@vn-smartsolutions.com)
    See Also:
    Gist Comments API
    Suppressed Checkstyle violations:
    MultipleStringLiterals (500 lines)
    • Method Detail

      • gist

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

        int number()
        Number.
        Returns:
        Comment id