예제 #1
0
        public void ProcessQuery(TwitterSearchRow query)
        {
            var searchResults = TwitterServiceInstance.Search(new SearchOptions
            {
                Count      = 9, //TODO: este count tiene que ser 15 dividido la cantidad de queries
                Q          = query.SearchTerm,
                SinceId    = query.LastQueryId,
                Resulttype = TwitterSearchResultType.Popular,
            });

            if (!searchResults.Statuses.Any())
            {
                return;
            }

            foreach (var tweet in searchResults.Statuses)
            {
                TwitterServiceInstance.FavoriteTweet(new FavoriteTweetOptions {
                    Id = tweet.Id
                });
                query.FavouritedTW++;
            }

            query.LastQueryId = searchResults.Statuses.Max(x => x.Id);
        }
예제 #2
0
        public void ProcessQuery(TwitterSearchRow query)
        {
            var searchResults = TwitterServiceInstance.Search(new SearchOptions
            {
                Count = 9, //TODO: este count tiene que ser 15 dividido la cantidad de queries
                Q = query.SearchTerm,
                SinceId = query.LastQueryId,
                Resulttype = TwitterSearchResultType.Popular,
            });

            if (!searchResults.Statuses.Any()) return;

            foreach (var tweet in searchResults.Statuses)
            {
                TwitterServiceInstance.FavoriteTweet(new FavoriteTweetOptions { Id = tweet.Id });
                query.FavouritedTW++;
            }

            query.LastQueryId = searchResults.Statuses.Max(x => x.Id);
        }