Exemple #1
0
        /// <summary>
        /// The default constructor takes all the settings from the appsettings file
        /// </summary>
        public OAuthTwitterWrapper()
        {
            string oAuthConsumerKey    = ConfigurationManager.AppSettings["oAuthConsumerKey"];
            string oAuthConsumerSecret = ConfigurationManager.AppSettings["oAuthConsumerSecret"];
            string oAuthUrl            = ConfigurationManager.AppSettings["oAuthUrl"];

            AuthenticateSettings = new AuthenticateSettings {
                OAuthConsumerKey = oAuthConsumerKey, OAuthConsumerSecret = oAuthConsumerSecret, OAuthUrl = oAuthUrl
            };
            string screenname      = ConfigurationManager.AppSettings["screenname"];
            string include_rts     = ConfigurationManager.AppSettings["include_rts"];
            string exclude_replies = ConfigurationManager.AppSettings["exclude_replies"];
            int    count           = Convert.ToInt16(ConfigurationManager.AppSettings["count"]);
            string timelineFormat  = ConfigurationManager.AppSettings["timelineFormat"];

            TimeLineSettings = new TimeLineSettings
            {
                ScreenName     = screenname,
                IncludeRts     = include_rts,
                ExcludeReplies = exclude_replies,
                Count          = count,
                TimelineFormat = timelineFormat
            };
            string searchFormat = ConfigurationManager.AppSettings["searchFormat"];
            string searchQuery  = ConfigurationManager.AppSettings["searchQuery"];

            SearchSettings = new SearchSettings
            {
                SearchFormat = searchFormat,
                SearchQuery  = searchQuery
            };
        }
 /// <summary>
 /// The default constructor takes all the settings from the appsettings file
 /// </summary>
 public OAuthTwitterWrapper()
 {
     string oAuthConsumerKey = ConfigurationManager.AppSettings["oAuthConsumerKey"];
     string oAuthConsumerSecret = ConfigurationManager.AppSettings["oAuthConsumerSecret"];
     string oAuthUrl = ConfigurationManager.AppSettings["oAuthUrl"];
     AuthenticateSettings = new AuthenticateSettings { OAuthConsumerKey = oAuthConsumerKey, OAuthConsumerSecret = oAuthConsumerSecret, OAuthUrl = oAuthUrl };
     string screenname = ConfigurationManager.AppSettings["screenname"];
     string include_rts = ConfigurationManager.AppSettings["include_rts"];
     string exclude_replies = ConfigurationManager.AppSettings["exclude_replies"];
     string count = ConfigurationManager.AppSettings["count"];
     string timelineFormat = ConfigurationManager.AppSettings["timelineFormat"];
     TimeLineSettings = new TimeLineSettings
     {
         ScreenName = screenname,
         IncludeRts = include_rts,
         ExcludeReplies = exclude_replies,
         Count = count,
         TimelineFormat = timelineFormat
     };
     string searchFormat = ConfigurationManager.AppSettings["searchFormat"];
     string searchQuery = ConfigurationManager.AppSettings["searchQuery"];
     SearchSettings = new SearchSettings
     {
         SearchFormat = searchFormat,
         SearchQuery = searchQuery
     };
 }
        /// <summary>
        /// The default constructor takes all the settings from the appsettings file
        /// </summary>
        public OAuthTwitterWrapper()
        {
            string oAuthConsumerKey    = ConfigurationManager.AppSettings["oAuthConsumerKey"];
            string oAuthConsumerSecret = ConfigurationManager.AppSettings["oAuthConsumerSecret"];
            string oAuthUrl            = ConfigurationManager.AppSettings["oAuthUrl"];

            AuthenticateSettings = new AuthenticateSettings {
                OAuthConsumerKey = oAuthConsumerKey, OAuthConsumerSecret = oAuthConsumerSecret, OAuthUrl = oAuthUrl
            };
            string screenname      = ConfigurationManager.AppSettings["screenname"];
            string include_rts     = ConfigurationManager.AppSettings["include_rts"];
            string exclude_replies = ConfigurationManager.AppSettings["exclude_replies"];
            int    count           = Convert.ToInt16(ConfigurationManager.AppSettings["count"]);
            string timelineFormat  = ConfigurationManager.AppSettings["timelineFormat"];

            TimeLineSettings = new TimeLineSettings
            {
                ScreenName     = screenname,
                IncludeRts     = include_rts,
                ExcludeReplies = exclude_replies,
                Count          = count,
                TimelineFormat = timelineFormat
            };
            string searchFormat = ConfigurationManager.AppSettings["searchFormat"];
            string searchQuery  = ConfigurationManager.AppSettings["searchQuery"];
            string resultType   = "recent";
            string geoCode      = "";     //"5.954920,80.554956,1200mi";
            string lang         = "si";
            string until        = "";     //DateTime.Now.ToString("yyyy-MM-dd");//"2018-08-28";

            SearchSettings = new SearchSettings
            {
                SearchFormat = searchFormat,
                SearchQuery  = searchQuery,
                ResultType   = resultType,
                GeoCode      = geoCode,
                Lang         = lang,
                Count        = count,
                Until        = until,
            };
        }