Package com.jcabi.github
Class Gist.Smart
java.lang.Object
com.jcabi.github.Gist.Smart
- All Implemented Interfaces:
Gist,JsonPatchable,JsonReadable
- Enclosing interface:
- Gist
Smart Gist with extra features.
- Since:
- 0.5
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.Gist
Gist.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomments()Get all comments of the gist.files()Get a list of all file names in the gist.fork()Fork the gist.github()GitHub we're in.Get gist identifier.jakarta.json.JsonObjectjson()Describe it in a JSON object.voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.Read file content.voidstar()Star a gist.booleanstarred()Checks if Gist is starred.voidunstar()Unstar a gist.voidWrite file content.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
gst- Gist
-
-
Method Details
-
identifier
Description copied from interface:GistGet gist identifier.- Specified by:
identifierin interfaceGist- Returns:
- Gist identifier
-
files
Get a list of all file names in the gist.- Returns:
- File names
- Throws:
IOException- If there is any I/O problem
-
github
Description copied from interface:GistGitHub we're in. -
read
Description copied from interface:GistRead file content.- Specified by:
readin interfaceGist- Parameters:
name- Name of it- Returns:
- File content
- Throws:
IOException- If there is any I/O problem- See Also:
-
write
Description copied from interface:GistWrite file content.- Specified by:
writein interfaceGist- Parameters:
name- Name of itcontent- Content to write- Throws:
IOException- If there is any I/O problem- See Also:
-
star
Description copied from interface:GistStar a gist.- Specified by:
starin interfaceGist- Throws:
IOException- If there is any I/O problem
-
unstar
Description copied from interface:GistUnstar a gist.- Specified by:
unstarin interfaceGist- Throws:
IOException- If there is any I/O problem
-
starred
Description copied from interface:GistChecks if Gist is starred.- Specified by:
starredin interfaceGist- Returns:
- True if gist is starred
- Throws:
IOException- If there is any I/O problem
-
fork
Description copied from interface:GistFork the gist.- Specified by:
forkin interfaceGist- Returns:
- Forked gist
- Throws:
IOException- If there is any I/O problem
-
comments
Description copied from interface:GistGet all comments of the gist.- Specified by:
commentsin interfaceGist- Returns:
- GistComments
- Throws:
IOException- If there is any I/O problem- See Also:
-
json
Description copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
patch
Description copied from interface:JsonPatchablePatch using this JSON object.- Specified by:
patchin interfaceJsonPatchable- Parameters:
json- JSON object- Throws:
IOException- If there is any I/O problem
-