Class GHGistBuilder


  • public class GHGistBuilder
    extends Object
    Builder pattern for creating a new Gist.
    Author:
    Kohsuke Kawaguchi
    See Also:
    GitHub#createGist()
    • Constructor Detail

      • GHGistBuilder

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

      • 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​(String fileName,
                                  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.