Created
May 18, 2011 00:26
-
-
Save kevinsawicki/977763 to your computer and use it in GitHub Desktop.
Create Gists using the GitHub v3 Java API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("Hello.java", file)); | |
gist = new GistService(client).createGist(gist); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
which package does GitHubClient in ?