lib/tdlib/client_methods.rb
def download_file(file_id:, priority:, offset:, limit:, synchronous:)
    broadcast('@type'       => 'downloadFile',
              'file_id'     => file_id,
              'priority'    => priority,
              'offset'      => offset,
              'limit'       => limit,
              'synchronous' => synchronous)
  end
# Downloads a file from the cloud.
# Download progress and completion of the download will be notified through updateFile updates.
#
# @param file_id [Integer] Identifier of the file to download.
# @param priority [Integer] Priority of the download (1-32).
#   The higher the priority, the earlier the file will be downloaded.
#   If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded
#   first.
# @param offset [Integer] The starting position from which the file needs to be downloaded.
# @param limit [Integer] Number of bytes which need to be downloaded starting from the "offset" position before the
#   download will automatically be canceled; use 0 to download without a limit.
# @param synchronous [Boolean] If false, this request returns file state just after the download has been started.
#   If true, this request returns file state only after the download has succeeded, has failed, has been canceled or
#   a new downloadFile request with different offset/limit parameters was sent.
# @return [TD::Types::File]
Downloads a file from the cloud.
Download progress and completion of the download will be notified through updateFile updates.
Downloads a file from the cloud . Download progress and completion of the download will be notified through updateFile updates .
def download_file(file_id:, priority:, offset:, limit:, synchronous:)
    broadcast('@type'       => 'downloadFile',
              'file_id'     => file_id,
              'priority'    => priority,
              'offset'      => offset,
              'limit'       => limit,
              'synchronous' => synchronous)
  end
def download_file ( file_id : , priority : , offset : , limit : , synchronous : ) broadcast ( '@type' => 'downloadFile' , 'file_id' => file_id , 'priority' => priority , 'offset' => offset , 'limit' => limit , 'synchronous' => synchronous ) end
Downloads a file from the cloud.
Downloads a file from the cloud .
None
TD::Types::File
file_id
Identifier of the file to download.
Identifier of the file to download .
priority
Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first.
Priority of the download ( 1 - 32 ) . The higher the priority the earlier the file will be downloaded . If the priorities of two files are equal then the last one for which downloadFile was called will be downloaded first .
offset
The starting position from which the file needs to be downloaded.
The starting position from which the file needs to be downloaded .
limit
Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.
Number of bytes which need to be downloaded starting from the " offset " position before the download will automatically be canceled ; use 0 to download without a limit .
synchronous
If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent.
If false this request returns file state just after the download has been started . If true this request returns file state only after the download has succeeded has failed has been canceled or a new downloadFile request with different offset / limit parameters was sent .