TijsVerkoyen\Twitter\Twitter::accountUpdateProfileColors PHP Method

accountUpdateProfileColors() public method

Each parameter's value must be a valid hexidecimal value, and may be either three or six characters (ex: #fff or #ffffff).
public accountUpdateProfileColors ( string[optional] $profileBackgroundColor = null, string[optional] $profileTextColor = null, string[optional] $profileLinkColor = null, string[optional] $profileSidebarFillColor = null, string[optional] $profileSidebarBorderColor = null, bool[optional] $includeEntities = null ) : array
$profileBackgroundColor string[optional]
$profileTextColor string[optional]
$profileLinkColor string[optional]
$profileSidebarFillColor string[optional]
$profileSidebarBorderColor string[optional]
$includeEntities bool[optional]
return array
    public function accountUpdateProfileColors($profileBackgroundColor = null, $profileTextColor = null, $profileLinkColor = null, $profileSidebarFillColor = null, $profileSidebarBorderColor = null, $includeEntities = null)
    {
        // validate
        if ($profileBackgroundColor == '' && $profileTextColor == '' && $profileLinkColor == '' && $profileSidebarFillColor == '' && $profileSidebarBorderColor == '') {
            throw new Exception('Specify a profileBackgroundColor, profileTextColor, profileLinkColor, profileSidebarFillColor or a profileSidebarBorderColor.');
        }
        // build parameters
        if ($profileBackgroundColor != null) {
            $parameters['profile_background_color'] = (string) $profileBackgroundColor;
        }
        if ($profileTextColor != null) {
            $parameters['profile_text_color'] = (string) $profileTextColor;
        }
        if ($profileLinkColor != null) {
            $parameters['profile_link_color'] = (string) $profileLinkColor;
        }
        if ($profileSidebarFillColor != null) {
            $parameters['profile_sidebar_fill_color'] = (string) $profileSidebarFillColor;
        }
        if ($profileSidebarBorderColor != null) {
            $parameters['profile_sidebar_border_color'] = (string) $profileSidebarBorderColor;
        }
        if ($includeEntities !== null) {
            $parameters['include_entities'] = $includeEntities ? 'true' : 'false';
        }
        // make the call
        return $this->doCall('account/update_profile_colors.json', $parameters, true, 'POST');
    }
Twitter