Class GHGistUpdater

java.lang.Object
org.kohsuke.github.GHGistUpdater

public class GHGistUpdater extends Object
Builder pattern for updating a Gist.
Author:
Martin van Zijl
  • Method Details

    • addFile

      public GHGistUpdater addFile(@Nonnull String fileName, @Nonnull String content) throws IOException
      Add file gh gist updater.
      Parameters:
      fileName - the file name
      content - the content
      Returns:
      the gh gist updater
      Throws:
      IOException - the io exception
    • deleteFile

      public GHGistUpdater deleteFile(@Nonnull String fileName) throws IOException
      Delete file.
      Parameters:
      fileName - the file name
      Returns:
      the GH gist updater
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • renameFile

      public GHGistUpdater renameFile(@Nonnull String fileName, @Nonnull String newFileName) throws IOException
      Rename file gh gist updater.
      Parameters:
      fileName - the file name
      newFileName - the new file name
      Returns:
      the gh gist updater
      Throws:
      IOException - the io exception
    • updateFile

      public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String content) throws IOException
      Update file gh gist updater.
      Parameters:
      fileName - the file name
      content - the content
      Returns:
      the gh gist updater
      Throws:
      IOException - the io exception
    • updateFile

      public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String newFileName, @Nonnull String content) throws IOException
      Update file name and content.
      Parameters:
      fileName - the file name
      newFileName - the new file name
      content - the content
      Returns:
      the gh gist updater
      Throws:
      IOException - the io exception
    • description

      public GHGistUpdater description(String desc)
      Description gh gist updater.
      Parameters:
      desc - the desc
      Returns:
      the gh gist updater
    • update

      public GHGist update() throws IOException
      Updates the Gist based on the parameters specified thus far.
      Returns:
      the gh gist
      Throws:
      IOException - the io exception