Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create Gists using the GitHub v3 Java API
GitHubClient client = new GitHubClient().setCredentials("user", "p4ssw0rd");
Gist gist = new Gist().setDescription("Prints a string to standard out");
GistFile file = new GistFile().setContent("System.out.println(\"Hello World\");");
gist.setFiles(Collections.singletonMap("", file));
gist = new GistService(client).createGist(gist);

This comment has been minimized.

Copy link

@ttpro1995 ttpro1995 commented Dec 10, 2017

which package does GitHubClient in ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment