예제 #1
0
        static void Main(string[] args)
        {
            tweetPublish    publishTweet    = new tweetPublish();
            FollowerManager followerManager = new FollowerManager();
            BotStart        startBot        = new BotStart();

            startBot.runBot();



            Console.ReadLine();
        }
예제 #2
0
        public void runBot()
        {
            tweetPublish    publishTweet    = new tweetPublish();
            FollowerManager followerManager = new FollowerManager();
            Random          rand            = new Random();
            int             roll            = 5;//rand.Next(0,5);

            #region ifStatement
            //if (roll == 1)
            //{
            //    publishTweet.searchForTweets();
            //    //timer
            //    runBot();
            //}
            //else if (roll == 2)
            //{
            //    publishTweet.replyToUser();
            //    //timer
            //    runBot();
            //}
            //else if (roll == 3)
            //{
            //    publishTweet.tweetWithMedia();
            //    //timer
            //    runBot();
            //}
            //else if(roll == 4)
            //{
            //    publishTweet.tweetTrending();
            //    runBot();
            //}
            #endregion
            switch (roll)
            {
            case 1:
                publishTweet.searchForTweets();
                Console.WriteLine("sleeping two minutes");
                Thread.Sleep(120000);     // 2 minues
                runBot();
                break;

            case 2:
                publishTweet.replyToUser();
                Console.WriteLine("sleeping two minutes");
                Thread.Sleep(120000);     // 2 minues
                runBot();
                break;

            case 3:
                publishTweet.tweetWithMedia();
                Console.WriteLine("sleeping two minutes");
                Thread.Sleep(120000);     // 2 minues
                runBot();
                break;

            case 4:
                publishTweet.tweetTrending();
                Console.WriteLine("sleeping two minutes");
                Thread.Sleep(120000);     // 2 minues
                runBot();
                break;

            case 5:
                followerManager.followUser();
                Console.WriteLine("sleeping two minutes");
                Thread.Sleep(120000);     // 2 minues
                break;
            }
        }