Class TwitterCredentials
java.lang.Object
com.northconcepts.datapipeline.twitter2.TwitterCredentials
The API key and secret plus an OAuth 1.0a access token or a bearer token, used to authorize Twitter API v2 requests.
-
Constructor Summary
ConstructorsConstructorDescriptionTwitterCredentials(String apiKey, String apiSecret, String bearerToken) Creates credentials that send the given bearer token with each request.TwitterCredentials(String apiKey, String apiSecret, String accessToken, String accessTokenSecret) Creates credentials that sign each request with OAuth 1.0a using the given access token. -
Method Summary
Modifier and TypeMethodDescriptionvoidsignRequest(OAuthRequest request, OAuth10aService service) Authorizes the request by OAuth 1.0a signing if an access token was given, otherwise with a bearer token header.
-
Constructor Details
-
TwitterCredentials
public TwitterCredentials(String apiKey, String apiSecret, String accessToken, String accessTokenSecret) Creates credentials that sign each request with OAuth 1.0a using the given access token. -
TwitterCredentials
Creates credentials that send the given bearer token with each request.
-
-
Method Details
-
getApiKey
-
getApiSecret
-
signRequest
public void signRequest(OAuthRequest request, OAuth10aService service) Authorizes the request by OAuth 1.0a signing if an access token was given, otherwise with a bearer token header.
-