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

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

Creates a new list for the authenticated user. Note that you can't create more than 20 lists per account.
ref: https://dev.twitter.com/docs/api/1.1/post/lists/update
public static CreateList ( this session, string name, string mode, string description = "", long ownerId, string ownerScreenName = "" ) : Task
session this
name string The name for the list.
mode string Whether your list is public or private. Values can be public or private. If no mode is specified the list will be public.
description string The description to give the list.
ownerId long
ownerScreenName string
Результат Task
        public static async Task<TwitterList> CreateList(this IUserSession session, string name, string mode, string description = "", long ownerId = 0,
            string ownerScreenName = "")
        {
            var parameters = new TwitterParametersCollection
                                 {
                                     {"name", name},
                                     {"mode", mode},
                                 };

            if (!string.IsNullOrWhiteSpace(description))
            {
                parameters.Add("description", description);
            }

            return await session.PostAsync(TwitterApi.Resolve("/1.1/lists/create.json"), parameters)
                          .ContinueWith(c => c.MapToSingle<TwitterList>());
        }