public class GitHubBuilder extends Object
| Constructor and Description |
|---|
GitHubBuilder() |
| Modifier and Type | Method and Description |
|---|---|
GitHub |
build() |
static GitHubBuilder |
fromCredentials()
First check if the credentials are configured using the ~/.github properties file.
|
static GitHubBuilder |
fromEnvironment()
Creates
GitHubBuilder by picking up coordinates from environment variables. |
static GitHubBuilder |
fromEnvironment(String loginVariableName,
String passwordVariableName,
String oauthVariableName)
Deprecated.
Use
fromEnvironment() to pick up standard set of environment variables, so that
different clients of this library will all recognize one consistent set of coordinates. |
static GitHubBuilder |
fromEnvironment(String loginVariableName,
String passwordVariableName,
String oauthVariableName,
String endpointVariableName)
Deprecated.
Use
fromEnvironment() to pick up standard set of environment variables, so that
different clients of this library will all recognize one consistent set of coordinates. |
static GitHubBuilder |
fromProperties(Properties props) |
static GitHubBuilder |
fromPropertyFile() |
static GitHubBuilder |
fromPropertyFile(String propertyFileName) |
GitHubBuilder |
withConnector(HttpConnector connector) |
GitHubBuilder |
withEndpoint(String endpoint) |
GitHubBuilder |
withOAuthToken(String oauthToken) |
GitHubBuilder |
withOAuthToken(String oauthToken,
String user) |
GitHubBuilder |
withPassword(String user,
String password) |
GitHubBuilder |
withProxy(Proxy p)
Configures connector
that uses HTTP library in JRE but use a specific proxy, instead of
the system default one.
|
GitHubBuilder |
withRateLimitHandler(RateLimitHandler handler) |
public static GitHubBuilder fromCredentials() throws IOException
IOException - If there are no credentials defined in the ~/.github properties file or the process environment.public static GitHubBuilder fromEnvironment(String loginVariableName, String passwordVariableName, String oauthVariableName) throws IOException
fromEnvironment() to pick up standard set of environment variables, so that
different clients of this library will all recognize one consistent set of coordinates.IOExceptionpublic static GitHubBuilder fromEnvironment(String loginVariableName, String passwordVariableName, String oauthVariableName, String endpointVariableName) throws IOException
fromEnvironment() to pick up standard set of environment variables, so that
different clients of this library will all recognize one consistent set of coordinates.IOExceptionpublic static GitHubBuilder fromEnvironment() throws IOException
GitHubBuilder by picking up coordinates from environment variables.
The following environment variables are recognized:
See class javadoc for the relationship between these coordinates.
For backward compatibility, the following environment variables are recognized but discouraged: login, password, oauth
IOExceptionpublic static GitHubBuilder fromPropertyFile() throws IOException
IOExceptionpublic static GitHubBuilder fromPropertyFile(String propertyFileName) throws IOException
IOExceptionpublic static GitHubBuilder fromProperties(Properties props)
public GitHubBuilder withEndpoint(String endpoint)
public GitHubBuilder withPassword(String user, String password)
public GitHubBuilder withOAuthToken(String oauthToken)
public GitHubBuilder withOAuthToken(String oauthToken, String user)
public GitHubBuilder withConnector(HttpConnector connector)
public GitHubBuilder withRateLimitHandler(RateLimitHandler handler)
public GitHubBuilder withProxy(Proxy p)
public GitHub build() throws IOException
IOExceptionCopyright © 2016. All Rights Reserved.