パッケージ twitter4j

クラス OAuth2Authorization

java.lang.Object
twitter4j.OAuth2Authorization
すべての実装されたインタフェース:
Serializable, Authorization

public class OAuth2Authorization extends Object implements Authorization, Serializable
関連項目:
  • メソッドの詳細

    • newBuilder

      戻り値:
      builder for OAuth2Authorization
    • getInstance

      public static OAuth2Authorization getInstance(String consumerKey, String consumerSecret)
      Equivalent to OAuth2Authorization.newBuilder().oAuthConsumer(key, secret).build();
      パラメータ:
      consumerKey - consumer key
      consumerSecret - consumer secret
      戻り値:
      OAuth2Authorization
    • getInstance

      public static OAuth2Authorization getInstance()
      Equivalent to OAuth2Authorization.newBuilder().build();
      戻り値:
      OAuth2Authorization
    • getOAuth2Token

      public OAuth2Token getOAuth2Token() throws TwitterException
      Obtains an OAuth 2 Bearer token.
      戻り値:
      OAuth 2 Bearer token
      例外:
      TwitterException - when Twitter service or network is unavailable, or connecting non-SSL endpoints.
      IllegalStateException - when Bearer token is already available, or OAuth consumer is not available.
      関連項目:
    • invalidateOAuth2Token

      public void invalidateOAuth2Token() throws TwitterException
      Revokes an issued OAuth 2 Bearer Token.
      例外:
      TwitterException - when Twitter service or network is unavailable, or connecting non-SSL endpoints.
      IllegalStateException - when Bearer token is not available.
    • getAuthorizationHeader

      public String getAuthorizationHeader(twitter4j.HttpRequest req)
      定義:
      getAuthorizationHeader インタフェース内 Authorization
      パラメータ:
      req - request
      戻り値:
      header
    • isEnabled

      public boolean isEnabled()
      インタフェースからコピーされた説明: Authorization
      Returns true if authorization credentials are set.
      定義:
      isEnabled インタフェース内 Authorization
      戻り値:
      true if authorization credentials are set
    • equals

      public boolean equals(Object o)
      オーバーライド:
      equals クラス内 Object
    • hashCode

      public int hashCode()
      オーバーライド:
      hashCode クラス内 Object
    • toString

      public String toString()
      オーバーライド:
      toString クラス内 Object