BoxKite.Twitter.FriendsFollowersExtensions.GetFriendsList C# (CSharp) Method

GetFriendsList() public static method

Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
ref: https://dev.twitter.com/docs/api/1.1/get/friends/list
public static GetFriendsList ( this session, string screenName = "", int userId, int count = 20, long cursor = -1 ) : Task
session this
screenName string screen_name or user_id must be provided
userId int screen_name or user_id must be provided
count int how many to return default 500
cursor long default is first page (-1) otherwise provide starting point
return Task
        public async static Task<UserListDetailedCursored> GetFriendsList(this ITwitterSession session, string screenName = "", int userId = 0, int count = 20, long cursor = -1)
        {
            var parameters = new TwitterParametersCollection
                                    {
                                        {"include_user_entities", true.ToString()},
                                    };
            parameters.Create(count: count, cursor: cursor, screen_name: screenName, user_id: userId, skip_status:true);

            if (parameters.EnsureEitherOr("screen_name", "user_id").IsFalse())
            {
                return session.MapParameterError<UserListDetailedCursored>(
                        "Either screen_name or user_id required");
            }

            return await session.GetAsync(TwitterApi.Resolve("/1.1/friends/list.json"), parameters)
                             .ContinueWith(t => t.MapToSingle<UserListDetailedCursored>());
        }