|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.unto.twitter.Api.Builder
public static class Api.Builder
A builder for an immutable Api instance.
The Api.Builder is the only way to construct a new Api instance.
Use the builder to configure a new Api instance with username and password
credentials for Twitter API calls.
Api api = Api.builder().username("username").password("password").build();
| Constructor Summary | |
|---|---|
Api.Builder()
|
|
| Method Summary | |
|---|---|
Api |
build()
Use the Builder instance to construct an immutable Api instance. |
Api.Builder |
host(String host)
Sets the default host (e.g., "twitter.com") for Twitter API calls. |
Api.Builder |
httpManager(HttpManager httpManager)
Sets the default HttpManager for Twitter API calls. |
Api.Builder |
password(String password)
Sets the password for authenticated Twitter API calls. |
Api.Builder |
port(int port)
Sets the default port (e.g., 80) for Twitter API calls. |
Api.Builder |
scheme(UtilProtos.Url.Scheme scheme)
Sets the default http scheme (e.g., Url.Scheme.HTTP) for Twitter API calls. |
Api.Builder |
username(String username)
Sets the username for authenticated Twitter API calls. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Api.Builder()
| Method Detail |
|---|
public Api build()
public Api.Builder host(String host)
host - the default host (e.g., "twitter.com") for Twitter API calls.
Api.Builder instance.public Api.Builder httpManager(HttpManager httpManager)
HttpManager for Twitter API calls.
httpManager - the default HttpManager for Twitter API calls.
Api.Builder instance.public Api.Builder password(String password)
The username must be set if the password is set, and the httpManager should not be set.
password - the password for authenticated Twitter API calls.
Api.Builder instance.public Api.Builder port(int port)
port - the default port (e.g., 80) for Twitter API calls.
Api.Builder instance.public Api.Builder scheme(UtilProtos.Url.Scheme scheme)
scheme - the default http scheme (e.g., Url.Scheme.HTTP) for Twitter
API calls.
Api.Builder instance.public Api.Builder username(String username)
The password must be set if the username is set, and the httpManager should not be set.
username - the username for authenticated Twitter API calls.
Api.Builder instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||