![JAR search and dependency download from the Maven repository](/logo.png)
twitter4jads.internal.models4j.TwitterBase Maven / Gradle / Ivy
The newest version!
package twitter4jads.internal.models4j;
import twitter4jads.auth.Authorization;
import twitter4jads.conf.Configuration;
/**
*
* @since Twitter4J 2.2.0
*/
public interface TwitterBase {
/**
* 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.
*
* @return the authenticating screen name
* @throws TwitterException when verifyCredentials threw an exception.
* @throws IllegalStateException if no credentials are supplied. i.e.) this is an anonymous Twitter instance
* @since Twitter4J 2.1.1
*/
String getScreenName() throws TwitterException, 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.
*
* @return the authenticating user's id
* @throws TwitterException when verifyCredentials threw an exception.
* @throws IllegalStateException if no credentials are supplied. i.e.) this is an anonymous Twitter instance
* @since Twitter4J 2.1.1
*/
long getId() throws TwitterException, IllegalStateException;
/**
* Registers a RateLimitStatusListener for account associated rate limits
*
* @param listener the listener to be added
* @see Rate Limiting | Twitter Developers
* @since Twitter4J 2.1.12
*/
void addRateLimitStatusListener(RateLimitStatusListener listener);
/**
* Returns the authorization scheme for this instance.
* The returned type will be either of BasicAuthorization, OAuthAuthorization, or NullAuthorization
*
* @return the authorization scheme for this instance
*/
Authorization getAuthorization();
/**
* Returns the configuration associated with this instance
*
* @return configuration associated with this instance
* @since Twitter4J 2.1.8
*/
Configuration getConfiguration();
/**
* Shuts down this instance and releases allocated resources.
*/
void shutdown();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy