twitter4j

## Interface TwitterBase

All Known Subinterfaces:
  Twitter

    public interface TwitterBase

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

### Method Summary

All Methods Instance Methods Abstract Methods
`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

### Method Detail

#### getScreenName

    String getScreenName()
                  throws TwitterException,
                         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.
  `IllegalStateException` - if no credentials are supplied. i.e.) this is an anonymous Twitter instance
Since:
  Twitter4J 2.1.1

#### getId

    long getId()
        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.

Returns:
  the authenticating user's id
Throws:
  `TwitterException` - when verifyCredentials threw an exception.
  `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 | Twitter Developers

#### onRateLimitStatus

    void onRateLimitStatus(Consumer<RateLimitStatusEvent> action)

Registers a lambda action for account associated rate limits

Parameters:
  `action` - the action to be added
Since:
  Twitter4J 4.0.4
See Also:
  Rate Limiting | Twitter Developers

#### onRateLimitReached

    void onRateLimitReached(Consumer<RateLimitStatusEvent> action)

Registers a RateLimitStatusListener for account associated rate limits

Parameters:
  `action` - the action to be added
Since:
  Twitter4J 4.0.4
See Also:
  Rate Limiting | Twitter Developers

#### 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