twitter4j
Interface TwitterBase

All Known Subinterfaces:
AsyncTwitter, Twitter, TwitterStream
All Known Implementing Classes:
AsyncTwitterImpl, TwitterImpl, TwitterStreamImpl

public interface TwitterBase

Since:
Twitter4J 2.2.0
Author:
Yusuke Yamamoto - yusuke at mac.com

Method Summary
 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.
 java.lang.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 shutdown()
          Shuts down this instance and releases allocated resources.
 

Method Detail

getScreenName

java.lang.String getScreenName()
                               throws TwitterException,
                                      java.lang.IllegalStateException
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.

Returns:
the authenticating screen name
Throws:
TwitterException - when verifyCredentials threw an exception.
java.lang.IllegalStateException - if no credentials are supplied. i.e.) this is an anonymous Twitter instance
Since:
Twitter4J 2.1.1

getId

long getId()
           throws TwitterException,
                  java.lang.IllegalStateException
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.

Returns:
the authenticating user's id
Throws:
TwitterException - when verifyCredentials threw an exception.
java.lang.IllegalStateException - if no credentials are supplied. i.e.) this is an anonymous Twitter instance
Since:
Twitter4J 2.1.1

addRateLimitStatusListener

void addRateLimitStatusListener(RateLimitStatusListener listener)
Registers a RateLimitStatusListener for account associated rate limits

Parameters:
listener - the listener to be added
Since:
Twitter4J 2.1.12
See Also:
Rate Limiting | dev.twitter.com

getAuthorization

Authorization getAuthorization()
Returns the authorization scheme for this instance.
The returned type will be either of BasicAuthorization, OAuthAuthorization, or NullAuthorization

Returns:
the authorization scheme for this instance

getConfiguration

Configuration getConfiguration()
Returns the configuration associated with this instance

Returns:
configuration associated with this instance
Since:
Twitter4J 2.1.8

shutdown

void shutdown()
Shuts down this instance and releases allocated resources.