Example #1
0
        static void Main(string[] args)
        {
            //int cycle_count = 0;
            //GooglePlus gp = new GooglePlus();
            Facebook fb = new Facebook();
            Twitter tw = new Twitter();
            YouTubeData ytd = new YouTubeData();
            youTubeAnalytics yta = new youTubeAnalytics(ytd);

            //yta.backFillYTAna(DateTime.Parse("2015-09-19"), DateTime.Parse("2015-09-20"));

            /*
             * Json parsing utility
             */
            //fb.getJsonItems("C:\\temp\\fb_json_fields.txt");

            /*
             * Twitter user tweet retrieval
             */
            //tweetRetrieval(tw);

            /*
             * Twitter history retrieval
             */
            //tw.getTwitterHashtagData("KeepItPumping", DateTime.Parse("2015-10-14"));
            //tw.getTwitterHashtagData("KeepItPumping", DateTime.Parse("2015-10-15"));
            //tw.getTwitterHashtagData("KeepItPumping", DateTime.Parse("2015-10-16"));

            /*
             * Load historical Facebook data from files
             */

            //facebookHistorical(fb);

            /*
             * get profile data from Google+ based on google_id
             */
            //gp.getProfile("101892303162187893133");

            /*
             * social media processing for all sites
             * runs on 15 minute cycles
             */
            //Console.WriteLine("YouTube Analytics:");
            //DateTime startTime = DateTime.Parse(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"));
            //DateTime endTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
            //yta.backFillYTAna(startTime, endTime);

            //while (true)
            //{

                Console.WriteLine(DateTime.Now.ToString());

                Console.WriteLine("YouTube:");
                ytd.getYouTubeData();

                Console.WriteLine("YouTube Analytics:");
                DateTime startTime = DateTime.Parse(DateTime.Now.AddDays(-4).ToString("yyyy-MM-dd"));
                DateTime endTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
                yta.backFillYTAna(startTime, endTime);

                Console.WriteLine("Facebook:");
                fb.getFacebookData();

                Console.WriteLine("Twitter Hashtag: KeepItPumping");
                tw.getTwitterHashtagData("KeepItPumping");
                Console.WriteLine("Twitter User: @KeepItPumping");
                tw.getTwitterUserData("@KeepItPumping");
                Console.WriteLine("Done");

                //Thread.Sleep(900000);
            //}
        }
Example #2
0
 public static void tweetRetrieval(Twitter tw)
 {
     tw.findOnTimeLine("TedRubin", "#KeepItPumping");
     tw.findOnTimeLine("Parentng", "#KeepItPumping");
     tw.findOnTimeLine("R_onR", "#KeepItPumping");
     tw.findOnTimeLine("Tammileetips", "#KeepItPumping");
     tw.findOnTimeLine("Just_B_Nice", "#KeepItPumping");
     tw.findOnTimeLine("5minutesformom", "#KeepItPumping");
     tw.findOnTimeLine("WhitneyMWS", "#KeepItPumping");
     tw.findOnTimeLine("VeraSweeney", "#KeepItPumping");
     tw.findOnTimeLine("RonRwoots", "#KeepItPumping");
     tw.findOnTimeLine("GoAptaris", "#KeepItPumping");
     tw.findOnTimeLine("Brand_Connector", "#KeepItPumping");
 }