public HttpResponseMessage conseguirSeguidores(string conseguirSeguidores) { long[] paises = new long[13]; paises[0] = 23424768; paises[1] = 23424782; paises[2] = 23424787; paises[3] = 23424801; paises[4] = 23424919; paises[5] = 23424768; paises[6] = 23424762; paises[7] = 468052; paises[8] = 23424762; paises[9] = 1; paises[10] = 23424950; paises[11] = 615702; paises[12] = 44418; IAuthenticatedUser usAut = Tweetinvi.User.GetAuthenticatedUser(); foreach (var woeid in paises) { var trends = Trends.GetTrendsAt(woeid); if (trends != null) { var tweets = Search.SearchTweets(trends.Trends[0].Name); var tweets2 = Search.SearchTweets(trends.Trends[1].Name); var tweets3 = Search.SearchTweets(trends.Trends[2].Name); if (tweets != null) { usAut.FollowUser(tweets.First().CreatedBy.ScreenName); } if (tweets2 != null) { usAut.FollowUser(tweets2.First().CreatedBy.ScreenName); } if (tweets3 != null) { usAut.FollowUser(tweets3.First().CreatedBy.ScreenName); } } } return(null); }
public async Task FollowUser_ReturnsAccountClientTask() { // Arrange var user = A.Fake <IUserIdentifier>(); // Act await _authenticatedUser.FollowUser(user); // Assert _usersClient.CallsTo(x => x.FollowUser(user)).MustHaveHappened(); }
private static void FollowerInteraction() { foreach (IUser user in authenticatedUser.GetFollowers(int.MaxValue)) { if (!user.Following) { authenticatedUser.FollowUser(user); } } foreach (IMention mention in authenticatedUser.GetMentionsTimeline(int.MaxValue)) { if (!mention.Favorited) { mention.Favorite(); } } }
public void FollowUser_CurrentCredentialsAreNotAuthenticatedUserCredentials_OperationPerformedWithAppropriateCredentials() { // Arrange var user = A.Fake <IUser>(); ITwitterCredentials startOperationWithCredentials = null; _fakeFriendshipController.CallsTo(x => x.CreateFriendshipWith(user)).ReturnsLazily(() => { startOperationWithCredentials = _fakeCredentialsAccessor.FakedObject.CurrentThreadCredentials; return(true); }); // Act _authenticatedUser.FollowUser(user); // Assert Assert.AreEqual(startOperationWithCredentials, _authenticatedUserCredentials); Assert.AreEqual(_fakeCredentialsAccessor.FakedObject.CurrentThreadCredentials, _currentCredentials); }
public static bool Follow(string screenName) { return(_user.FollowUser(screenName)); }
public bool FollowUser(User selected) { IAuthenticatedUser auth = Tweetinvi.User.GetAuthenticatedUser(); return(auth.FollowUser(selected.Handle)); }