getUserData static method

Future<User> getUserData(
  1. String apiKey,
  2. String apiSecretKey,
  3. String accessToken,
  4. String accessTokenSecret,
)

get user info

Implementation

static Future<User> getUserData(
  String apiKey,
  String apiSecretKey,
  String accessToken,
  String accessTokenSecret,
) async {
  try {
    final authParams = requestHeader(
      apiKey: apiKey,
      oauthToken: accessToken,
    );
    final params = await httpGet(
      ACCOUNT_VERIFY_URI,
      authHeader: authParams,
      apiKey: apiKey,
      apiSecretKey: apiSecretKey,
      tokenSecret: accessTokenSecret,
    );
    return User(params);
  } on Exception {
    rethrow;
  }
}