Beispiel #1
0
        public void StartStreaming()
        {
            ////streamer.GetTweets(this);
            if (Stream != null)
            {
                return;
            }

            Stream             = new TwitterStream(Hashtag);
            Stream.TweetAdded += StreamOnTweetAdded;
            Stream.StartStream();
        }
Beispiel #2
0
        public HomeController(ILogger <HomeController> logger, IHubContext <SignalRTweetHub> tweetHub)
        {
            _logger   = logger;
            _tweetHub = tweetHub;



            if (_twitterStream == null)
            {
                _twitterStream = new TwitterStream(_tweetHub);
            }

            //if (_twitterStream.GetStreamStatus() != Tweetinvi.Models.StreamState.Running) _twitterStream.StartStream();
            new Task(() => { _twitterStream.StartStream(); }).Start();
        }
 /// <summary>
 /// Starts a Twitter Stream based on the specified geographic coordinates
 /// </summary>
 /// <param name="latitude1">Latitude of user location (bottom_left)</param>
 /// <param name="longitude1">Longitude of user location (bottom_left)</param>
 /// <param name="latitude2">Latitude of user location (top_right)</param>
 /// <param name="longitude2">Longitude of user location (top_right)</param>
 public async Task StartTwitterStream(double latitude1, double longitude1, double latitude2, double longitude2)
 {
     await TwitterStream.StartStream(latitude1, longitude1, latitude2, longitude2);
 }