Class: TFile

Inherits:
Object
  • Object
show all
Defined in:
lib/objects/file.rb

Overview

Monday, August 24 2020

This object represents a file ready to be downloaded.

Direct Known Subclasses

Sticker

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ TFile

:nodoc:



8
9
10
# File 'lib/objects/file.rb', line 8

def initialize(file) # :nodoc:
  @file = file
end

Instance Method Details

#file_idObject

Identifier for this file, which can be used to download or reuse the file.



13
14
15
# File 'lib/objects/file.rb', line 13

def file_id
  @file.file_id
end

#file_pathObject

Optional. File path.



29
30
31
# File 'lib/objects/file.rb', line 29

def file_path
  @file.file_path
end

#file_sizeObject

Optional. File size, if known.



24
25
26
# File 'lib/objects/file.rb', line 24

def file_size
  @file.file_size
end

#file_unique_idObject

Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.



19
20
21
# File 'lib/objects/file.rb', line 19

def file_unique_id
  @file.file_unique_id
end