Beispiel #1
0
        public async Task ProcessTweetAsync(string keyword, MatchedTweetReceivedEventArgs args)
        {
            var responseDocument = await MakeRequest(args.Tweet.FullText);

            var tweetSentiment = new TweetSentiment
            {
                FullText = args.Tweet.FullText,
                Score    = responseDocument.Score
            };

            Console.WriteLine($"[{DateTime.Now}] - Tweet: {tweetSentiment.FullText}. Sentiment: {tweetSentiment.Score}");

            await _tweetsRepository.SaveTweetAsync(args, keyword, tweetSentiment);
        }