BoxKite.Twitter.ListExtensions.GetLists C# (CSharp) Метод

GetLists() публичный статический Метод

Returns all lists the authenticating or specified user subscribes to, including their own. The user is specified using the user_id or screen_name parameters. If no user is given, the authenticating user is used.
ref: https://dev.twitter.com/docs/api/1.1/get/lists/list
public static GetLists ( this session, long userId, string screenName = "", bool reverse = false ) : Task>
session this
userId long The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
screenName string The screen name of the user for whom to return results for.
reverse bool Set this to true if you would like owned lists to be returned first.
Результат Task>
        public static async Task<TwitterResponseCollection<TwitterList>> GetLists(this ITwitterSession session, long userId = 0, string screenName = "", bool reverse = false)
        {
            var parameters = new TwitterParametersCollection {{"reverse", reverse.ToString()}};
            parameters.Create(screen_name: screenName, user_id: userId);

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

            return await session.GetAsync(TwitterApi.Resolve("/1.1/lists/list.json"), parameters)
                          .ContinueWith(c => c.MapToMany<TwitterList>());
        }