BoxKite.Twitter.UsersExtensions.ChangeAccountColours C# (CSharp) Метод

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

Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com. Each parameter's value must be a valid hexidecimal value, and may be either three or six characters (ex: #fff or #ffffff).
ref: https://dev.twitter.com/docs/api/1.1/post/account/update_profile_colors
public static ChangeAccountColours ( this session, string profileBackgroundColor = "", string profileLinkColor = "", string profileSidebarBorderColor = "", string profileSidebarFillColor = "", string profileTextColor = "" ) : Task
session this
profileBackgroundColor string Example Values: 3D3D3D
profileLinkColor string Example Values: 3D3D3D
profileSidebarBorderColor string Example Values: 3D3D3D
profileSidebarFillColor string Example Values: 3D3D3D
profileTextColor string Example Values: 3D3D3D
Результат Task
        public static async Task<User> ChangeAccountColours(this IUserSession session,
            string profileBackgroundColor = "", string profileLinkColor = "", string profileSidebarBorderColor = "",
            string profileSidebarFillColor = "", string profileTextColor = "")
        {
            var parameters = new TwitterParametersCollection();
            parameters.Create(include_entities: true, skip_status: true);

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

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

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

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

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

            return await session.PostAsync(TwitterApi.Resolve("/1.1/account/update_profile_colors.json"), parameters)
                           .ContinueWith(c => c.MapToSingle<User>());
        }