public interface TwitterBase
Modifier and Type | Method and Description |
---|---|
void |
addRateLimitStatusListener(RateLimitStatusListener listener)
Registers a RateLimitStatusListener for account associated rate limits
|
Authorization |
getAuthorization()
Returns the authorization scheme for this instance.
The returned type will be either of BasicAuthorization, OAuthAuthorization, or NullAuthorization |
Configuration |
getConfiguration()
Returns the configuration associated with this instance
|
long |
getId()
Returns authenticating user's user id.
This method may internally call verifyCredentials() on the first invocation if - this instance is authenticated by Basic and email address is supplied instead of screen name, or - this instance is authenticated by OAuth. |
String |
getScreenName()
Returns authenticating user's screen name.
This method may internally call verifyCredentials() on the first invocation if - this instance is authenticated by Basic and email address is supplied instead of screen name, or - this instance is authenticated by OAuth. Note that this method returns a transiently cached (will be lost upon serialization) screen name while it is possible to change a user's screen name. |
void |
onRateLimitReached(Consumer<RateLimitStatusEvent> action)
Registers a RateLimitStatusListener for account associated rate limits
|
void |
onRateLimitStatus(Consumer<RateLimitStatusEvent> action)
Registers a lambda action for account associated rate limits
|
String getScreenName() throws TwitterException, IllegalStateException
TwitterException
- when verifyCredentials threw an exception.IllegalStateException
- if no credentials are supplied. i.e.) this is an anonymous Twitter instancelong getId() throws TwitterException, IllegalStateException
TwitterException
- when verifyCredentials threw an exception.IllegalStateException
- if no credentials are supplied. i.e.) this is an anonymous Twitter instancevoid addRateLimitStatusListener(RateLimitStatusListener listener)
listener
- the listener to be addedvoid onRateLimitStatus(Consumer<RateLimitStatusEvent> action)
action
- the action to be addedvoid onRateLimitReached(Consumer<RateLimitStatusEvent> action)
action
- the action to be addedAuthorization getAuthorization()
Configuration getConfiguration()
Copyright © 2018. All rights reserved.