public ExtractedTweet GetTweet(long statusId) { try { TweetinviConfig.CurrentThreadSettings.TweetMode = TweetMode.Extended; var tweet = Tweet.GetTweet(statusId); _statisticsHandler.CalledTweetApi(); if (tweet == null) { return(null); //TODO: test this } return(_tweetExtractor.Extract(tweet)); } catch (Exception e) { _logger.LogError(e, "Error retrieving tweet {TweetId}", statusId); return(null); } }
public ExtractedTweet GetTweet(long statusId) { try { _twitterAuthenticationInitializer.EnsureAuthenticationIsInitialized(); ExceptionHandler.SwallowWebExceptions = false; TweetinviConfig.CurrentThreadSettings.TweetMode = TweetMode.Extended; var tweet = Tweet.GetTweet(statusId); _statisticsHandler.CalledTweetApi(); if (tweet == null) { return(null); //TODO: test this } return(_tweetExtractor.Extract(tweet)); } catch (Exception e) { _logger.LogError(e, "Error retrieving tweet {TweetId}", statusId); return(null); } }