public SearchResultsViewModel(INavigationService navigationService,
                               IPlatformAdaptor platformAdapter, IAuthInformation authInformation)
 {
     _authInformation      = authInformation;
     _twitterAuthenticator = new TwitterAuthenticator(platformAdapter, _authInformation.TwitterConsumerKey, _authInformation.TwitterConsumerSecret);
     _isSearching          = true;
     Tweets = new ObservableCollection <Tweet>();
 }
Example #2
0
 public UserSession(string clientID, string clientSecret, IPlatformAdaptor platformAdaptor, int _waitTimeoutSeconds = 30) 
     : base(clientID, clientSecret, _waitTimeoutSeconds)
 {
     this.clientID = clientID;
     this.clientSecret = clientSecret;
     TwitterCredentials = TwitterCredentials.Null;
     PlatformAdaptor = platformAdaptor;
     waitTimeoutSeconds = _waitTimeoutSeconds;
 }
 public UserSession(string clientID, string clientSecret, IPlatformAdaptor platformAdaptor, int _waitTimeoutSeconds = 30)
     : base(clientID, clientSecret, _waitTimeoutSeconds)
 {
     this.clientID      = clientID;
     this.clientSecret  = clientSecret;
     TwitterCredentials = TwitterCredentials.Null;
     PlatformAdaptor    = platformAdaptor;
     waitTimeoutSeconds = _waitTimeoutSeconds;
 }
Example #4
0
 public UserSession(TwitterCredentials credentials, IPlatformAdaptor platformAdaptor, int _waitTimeoutSeconds = 30)
     : base(credentials.ConsumerKey, credentials.ConsumerSecret, _waitTimeoutSeconds)
 {
     TwitterCredentials = credentials;
     clientID = credentials.ConsumerKey;
     clientSecret = credentials.ConsumerSecret;
     bearerToken = credentials.BearerToken;
     PlatformAdaptor = platformAdaptor;
     waitTimeoutSeconds = _waitTimeoutSeconds;
     IsActive = true;
 }
 public UserSession(TwitterCredentials credentials, IPlatformAdaptor platformAdaptor, int _waitTimeoutSeconds = 30)
     : base(credentials.ConsumerKey, credentials.ConsumerSecret, _waitTimeoutSeconds)
 {
     TwitterCredentials = credentials;
     clientID           = credentials.ConsumerKey;
     clientSecret       = credentials.ConsumerSecret;
     bearerToken        = credentials.BearerToken;
     PlatformAdaptor    = platformAdaptor;
     waitTimeoutSeconds = _waitTimeoutSeconds;
     IsActive           = true;
 }
Example #6
0
        public TwitterClient(IPlatformAdaptor platformAdaptor, string consumerKey, string consumerSecret)
        {
            if (platformAdaptor == null)
            {
                throw new ArgumentNullException("platformAdaptor");
            }
            if (consumerKey.IsNullOrWhiteSpace())
            {
                throw new ArgumentException("consumerKey");
            }
            if (consumerSecret.IsNullOrWhiteSpace())
            {
                throw new ArgumentException("consumerSecret");
            }

            m_platformAdaptor = platformAdaptor;
            m_consumerKey     = consumerKey;
            m_consumerSecret  = consumerSecret;

            DefaultPageSize = 20;
            Timeout         = TimeSpan.FromSeconds(100);
        }
 public TwitterConnection(string twitterConsumerKey, string twitterConsumerSecret, IPlatformAdaptor platformAdaptor = null)
  {
      PlatformAdaptor = platformAdaptor;
      ApplicationSession = BuildApplicationSession(twitterConsumerKey, twitterConsumerSecret);
      UserSession = BuildUserSession(twitterConsumerKey, twitterConsumerSecret);
  }
 // ReSharper disable once UnusedParameter.Local
 public TwitterConnection(string twitterConsumerKey, string twitterConsumerSecret, string xauthusername, string xauthpassword, IPlatformAdaptor platformAdaptor = null)
 {
     PlatformAdaptor = platformAdaptor;
     UserSession = BuildUserSession(twitterConsumerKey, twitterConsumerSecret);
 }
 public TwitterConnection(TwitterCredentials twitterCredentials, IPlatformAdaptor platformAdaptor = null)
 {
     PlatformAdaptor = platformAdaptor;
     TwitterCredentials = twitterCredentials;
     UserSession = BuildUserSession();
 }
 public TwitterConnection(string twitterConsumerKey, string twitterConsumerSecret, IPlatformAdaptor platformAdaptor = null)
 {
     PlatformAdaptor    = platformAdaptor;
     ApplicationSession = BuildApplicationSession(twitterConsumerKey, twitterConsumerSecret);
     UserSession        = BuildUserSession(twitterConsumerKey, twitterConsumerSecret);
 }
 // ReSharper disable once UnusedParameter.Local
 public TwitterConnection(string twitterConsumerKey, string twitterConsumerSecret, string xauthusername, string xauthpassword, IPlatformAdaptor platformAdaptor = null)
 {
     PlatformAdaptor = platformAdaptor;
     UserSession     = BuildUserSession(twitterConsumerKey, twitterConsumerSecret);
 }
 public TwitterConnection(TwitterCredentials twitterCredentials, IPlatformAdaptor platformAdaptor = null)
 {
     PlatformAdaptor    = platformAdaptor;
     TwitterCredentials = twitterCredentials;
     UserSession        = BuildUserSession();
 }