java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHGist
Gist.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes this gist.boolean
Equals.fork()
Forks this gist into your own.int
Gets comment count.Gets comments url.Gets commits url.Gets description.Gets file.getFiles()
Gets files.Gets forks url.Gets the id for this Gist.Gets git pull url.Gets git push url.Get the html url.long
getId()
Deprecated.getOwner()
Gets owner.int
hashCode()
Hash code.boolean
isPublic()
Is public boolean.boolean
Is starred boolean.List forks paged iterable.void
star()
Star.void
unstar()
Unstar.update()
Updates this gist via a builder.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Method Details
-
getId
Deprecated.UsegetGistId()
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 runtimeNumberFormatException
. -
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 ofgetId()
.- Returns:
- id of this Gist
-
getOwner
Gets owner.- Returns:
- User that owns this Gist.
- Throws:
IOException
- the io exception
-
getForksUrl
Gets forks url.- Returns:
- the forks url
-
getCommitsUrl
Gets commits url.- Returns:
- the commits url
-
getGitPullUrl
Gets git pull url.- Returns:
- URL like https://gist.github.com/gists/12345.git
-
getGitPushUrl
Gets git push url.- Returns:
- the git push url
-
getHtmlUrl
Get the html url.- Returns:
- the github html url
-
isPublic
public boolean isPublic()Is public boolean.- Returns:
- the boolean
-
getDescription
Gets description.- Returns:
- the description
-
getCommentCount
public int getCommentCount()Gets comment count.- Returns:
- the comment count
-
getCommentsUrl
Gets comments url.- Returns:
- API URL of listing comments.
-
getFile
Gets file.- Parameters:
name
- the name- Returns:
- the file
-
getFiles
Gets files.- Returns:
- the files
-
star
Star.- Throws:
IOException
- the io exception
-
unstar
Unstar.- Throws:
IOException
- the io exception
-
isStarred
Is starred boolean.- Returns:
- the boolean
- Throws:
IOException
- the io exception
-
fork
Forks this gist into your own.- Returns:
- the gh gist
- Throws:
IOException
- the io exception
-
listForks
List forks paged iterable.- Returns:
- the paged iterable
-
delete
Deletes this gist.- Throws:
IOException
- the io exception
-
update
Updates this gist via a builder.- Returns:
- the gh gist updater
- Throws:
IOException
- the io exception
-
equals
Equals. -
hashCode
public int hashCode()Hash code.
-
getGistId()
instead.