public List <Models.User> GetUserFollowers()
        {
            var model  = new List <Models.User>();
            var result = Auth.ExecuteOperationWithCredentials(_credentialService.GetUserCredentials(), () =>
            {
                // Get the first 250 followers of the user
                var followers         = User.GetFollowers(User.GetAuthenticatedUser(_credentialService.GetUserCredentials()).ScreenName);
                IEnumerator <IUser> e = followers.GetEnumerator();
                while (e.MoveNext())
                {
                    model.Add(new Models.User
                    {
                        Name            = e.Current.Name,
                        ScreenName      = e.Current.ScreenName,
                        StatusesCount   = e.Current.StatusesCount,
                        FollowersCount  = e.Current.FollowersCount,
                        FriendsCount    = e.Current.FriendsCount,
                        ProfileImage    = e.Current.ProfileImageUrl,
                        BackgroundImage = e.Current.ProfileBannerURL
                    });
                }
                return(model);
            });

            return(result);
        }
Exemple #2
0
 public static async Task <IEnumerable <IUser> > GetFollowers(string userScreenName, int maxFollowersToRetrieve = 250)
 {
     return(await Sync.ExecuteTaskAsync(() => User.GetFollowers(userScreenName, maxFollowersToRetrieve)));
 }
Exemple #3
0
 public static async Task <IEnumerable <IUser> > GetFollowers(IUserIdentifier userIdentifier, int maxFollowersToRetrieve = 250)
 {
     return(await Sync.ExecuteTaskAsync(() => User.GetFollowers(userIdentifier, maxFollowersToRetrieve)));
 }