示例#1
0
        public TwitterApp(ITwitterClient twitterApiClient)
        {
            // init twitter api client and login
            _twitterApiClient = twitterApiClient;
            _loggedInUser     = _twitterApiClient.VerifyCrednetials();

            // init tweets manager
            _tweetsManager = new TweetsManager(_twitterApiClient);
            _tweetsManager.RefreshAllAsync();

            // init replies manager
            _repliesManager = new RepliesManager(_twitterApiClient);
            _repliesManager.RefreshAllAsync();

            // init direct message manager
            _directMessagesManager = new DirectMessagesManager(_twitterApiClient);
            _directMessagesManager.RefreshAllAsync();

            // init user profile manager
            _userProfileManager = new UserProfileManager(_twitterApiClient);
        }
示例#2
0
        public TwitterApp(string username, string password, ExtendedUser loggedInUser)
        {
            _twitterApiClient = new TwitterClient(username, password);
            _loggedInUser     = loggedInUser;

            // init tiny url client
            _tinyUrlClient = new TinyUrlClient();

            // init twitpic client
            _twitPicClient = new TwitPicClient(username, password);

            // init tweets manager
            _tweetsManager = new TweetsManager(username, password);
            TweetsManager.DefaultInstance = _tweetsManager;

            // init replies manager
            _repliesManager = new RepliesManager(username, password);
            RepliesManager.DefaultInstance = _repliesManager;

            // init direct message manager
            _directMessagesManager = new DirectMessagesManager(username, password);

            // init user profile manager
            _userProfileManager = new UserProfileManager(username, password);
            _userProfileManager.SelectedUser   = loggedInUser;
            UserProfileManager.DefaultInstance = _userProfileManager;

            // init friends manager
            _friendsManager = new FriendsManager(username, password);

            // init search manager
            _searchManager = new SearchManager(username, password);

            // init saved search manager
            _savedSearchesManager = new SavedSearchesManager(username, password);

            // init favourites manager
            _favouritesManager = new FavouritesManager(username, password);
        }