public function downloadFile($fileId)
    {
        $file = $this->getFile($fileId);
        $options = [
            CURLOPT_HEADER => 0,
            CURLOPT_HTTPGET => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $this->getFileUrl().'/'.$file->getFilePath(),
        ];

        return $this->executeCurl($options);
    }
public function downloadFile($fileId)
    {
        $file = $this->getFile($fileId);
        $options = [
            CURLOPT_HEADER => 0,
            CURLOPT_HTTPGET => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $this->getFileUrl().'/'.$file->getFilePath(),
        ];

        return $this->executeCurl($options);
    }
public function downloadFile ( $ fileId ) { $ file = $ this -> getFile ( $ fileId ) ; $ options = [ CURLOPT_HEADER => 0 , CURLOPT_HTTPGET => 1 , CURLOPT_RETURNTRANSFER => 1 , CURLOPT_URL => $ this -> getFileUrl ( ) . '/' . $ file -> getFilePath ( ) , ] ; return $ this -> executeCurl ( $ options ) ; }
Get file contents via cURL

@param $fileId

@return string

@throws \TelegramBot\Api\HttpException
Get file contents via cURL