org.kohsuke.github
Class GitHub

java.lang.Object
  extended by org.kohsuke.github.GitHub

public class GitHub
extends java.lang.Object

Root of the GitHub API.

Author:
Kohsuke Kawaguchi

Method Summary
static GitHub connect()
          Obtains the credential from "~/.github"
static GitHub connect(java.lang.String login, java.lang.String apiToken)
           
static GitHub connectAnonymously()
          Connects to GitHub anonymously.
 GHRepository createRepository(java.lang.String name, java.lang.String description, java.lang.String homepage, boolean isPublic)
          Creates a new repository.
 GHUser getMyself()
          Gets the GHUser that represents yourself.
 GHUser getUser(java.lang.String login)
          Obtains the object that represents the named user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

connect

public static GitHub connect()
                      throws java.io.IOException
Obtains the credential from "~/.github"

Throws:
java.io.IOException

connect

public static GitHub connect(java.lang.String login,
                             java.lang.String apiToken)
                      throws java.io.IOException
Throws:
java.io.IOException

connectAnonymously

public static GitHub connectAnonymously()
Connects to GitHub anonymously. All operations that requires authentication will fail.


getUser

public GHUser getUser(java.lang.String login)
               throws java.io.IOException
Obtains the object that represents the named user.

Throws:
java.io.IOException

getMyself

public GHUser getMyself()
                 throws java.io.IOException
Gets the GHUser that represents yourself.

Throws:
java.io.IOException

createRepository

public GHRepository createRepository(java.lang.String name,
                                     java.lang.String description,
                                     java.lang.String homepage,
                                     boolean isPublic)
                              throws java.io.IOException
Creates a new repository.

Returns:
Newly created repository.
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.