Exemple #1
0
        public static List <Twittes> Parce(string inputUser)
        {
            List <Twittes> ListTwitte = new List <Twittes>();
            var            twittes    = twitterService.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions()
            {
                ScreenName = inputUser, Count = 5
            });

            foreach (var twite in twittes)
            {
                string statics = Statistics.SymbolsCount(twite.Text);
                var    twitte  = new Twittes()
                {
                    NameTwitte = twite.User.Name, Date = twite.CreatedDate.ToString(), UserId = twite.User.ScreenName, StatisticTwitte = statics
                };
                ListTwitte.Add(twitte);
            }
            return(ListTwitte);
        }
 public static string JsonTwittes(Twittes twitte)
 {
     return(JsonConvert.SerializeObject(twitte));
 }