Class GHGist

    • Method Detail

      • getId

        @Deprecated
        public long getId()
        Deprecated.
        Use getGistId() instead.
        Unlike most other GitHub objects, the id for Gists can be non-numeric, such as "aa5a315d61ae9438b18d". If the id is numeric, this method will get it. If id is not numeric, this will throw a runtime NumberFormatException.
        Overrides:
        getId in class GHObject
        Returns:
        id of the Gist.
      • getGistId

        public String getGistId()
        Gets the id for this Gist. Unlike most other GitHub objects, the id for Gists can be non-numeric, such as "aa5a315d61ae9438b18d". This should be used instead of getId().
        Returns:
        id of this Gist
      • getOwner

        public GHUser getOwner()
                        throws IOException
        Gets owner.
        Returns:
        User that owns this Gist.
        Throws:
        IOException - the io exception
      • getForksUrl

        public String getForksUrl()
        Gets forks url.
        Returns:
        the forks url
      • getCommitsUrl

        public String getCommitsUrl()
        Gets commits url.
        Returns:
        the commits url
      • getGitPullUrl

        public String getGitPullUrl()
        Gets git pull url.
        Returns:
        URL like https://gist.github.com/gists/12345.git
      • getGitPushUrl

        public String getGitPushUrl()
        Gets git push url.
        Returns:
        the git push url
      • getHtmlUrl

        public URL getHtmlUrl()
        Get the html url.
        Specified by:
        getHtmlUrl in class GHObject
        Returns:
        the github html url
      • isPublic

        public boolean isPublic()
        Is public boolean.
        Returns:
        the boolean
      • getDescription

        public String getDescription()
        Gets description.
        Returns:
        the description
      • getCommentCount

        public int getCommentCount()
        Gets comment count.
        Returns:
        the comment count
      • getCommentsUrl

        public String getCommentsUrl()
        Gets comments url.
        Returns:
        API URL of listing comments.
      • getFile

        public GHGistFile getFile​(String name)
        Gets file.
        Parameters:
        name - the name
        Returns:
        the file
      • isStarred

        public boolean isStarred()
                          throws IOException
        Is starred boolean.
        Returns:
        the boolean
        Throws:
        IOException - the io exception
      • listForks

        public PagedIterable<GHGist> listForks()
        List forks paged iterable.
        Returns:
        the paged iterable
      • equals

        public boolean equals​(Object o)
        Equals.
        Overrides:
        equals in class Object
        Parameters:
        o - the o
        Returns:
        true, if successful
      • hashCode

        public int hashCode()
        Hash code.
        Overrides:
        hashCode in class Object
        Returns:
        the int
      • getRoot

        @Deprecated
        public GitHub getRoot()
        Deprecated.
        For access to the GitHub instance, use a local copy instead of pulling it out of objects.
        Get the root GitHub instance for this object.
        Returns:
        the root GitHub instance