Class GHGistBuilder

java.lang.Object
org.kohsuke.github.GHGistBuilder

public class GHGistBuilder extends Object
Builder pattern for creating a new Gist.
Author:
Kohsuke Kawaguchi
See Also:
  • Constructor Details

    • GHGistBuilder

      public GHGistBuilder(GitHub root)
      Instantiates a new Gh gist builder.
      Parameters:
      root - the root
  • Method Details

    • description

      public GHGistBuilder description(String desc)
      Description gh gist builder.
      Parameters:
      desc - the desc
      Returns:
      the gh gist builder
    • public_

      public GHGistBuilder public_(boolean v)
      Public gh gist builder.
      Parameters:
      v - the v
      Returns:
      the gh gist builder
    • file

      public GHGistBuilder file(@Nonnull String fileName, @Nonnull String content)
      File gh gist builder.
      Parameters:
      fileName - the file name
      content - the content
      Returns:
      Adds a new file.
    • create

      public GHGist create() throws IOException
      Creates a Gist based on the parameters specified thus far.
      Returns:
      created Gist
      Throws:
      IOException - if Gist cannot be created.