Beispiel #1
0
        private List <Tweet> GetTweets(GameId gameId, string hashTag, FootballGame footballGame)
        {
            if (_tweetRepository.IsTweetOfGameCollected(gameId))
            {
                return(_tweetRepository.GetGameTweets(gameId));
            }

            var tweets = _tweetConnector.CollectTweets(footballGame, hashTag).ToList();

            tweets.ForEach(t => _tweetRepository.AddEvent(gameId, t));
            return(tweets);
        }