TijsVerkoyen\Twitter\Twitter::accountUpdateProfileBackgroundImage PHP Метод

accountUpdateProfileBackgroundImage() публичный Метод

Updates the authenticating user's profile background image.
public accountUpdateProfileBackgroundImage ( string $image, bool[optional] $tile = false, bool[optional] $includeEntities = null ) : array
$image string The path to the background image for the profile. Must be a valid GIF, JPG, or PNG image of less than 800 kilobytes in size. Images with width larger than 2048 pixels will be forceably scaled down.
$tile bool[optional]
$includeEntities bool[optional]
Результат array
    public function accountUpdateProfileBackgroundImage($image, $tile = false, $includeEntities = null)
    {
        // validate
        if (!file_exists($image)) {
            throw new Exception('Image (' . $image . ') doesn\'t exists.');
        }
        // build parameters
        $parameters = null;
        if ($tile) {
            $parameters['tile'] = 'true';
        }
        if ($includeEntities !== null) {
            $parameters['include_entities'] = $includeEntities ? 'true' : 'false';
        }
        // make the call
        return $this->doCall('account/update_profile_background_image.json', $parameters, true, 'POST', $image);
    }
Twitter