Class: VideoNote

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

Overview

Monday, August 24 2020 EAT

This object represents a video message

(available in Telegram apps as of v.4.0).

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ VideoNote

:nodoc:



11
12
13
# File 'lib/objects/video_note.rb', line 11

def initialize(obj) # :nodoc:
  @note = obj
end

Instance Method Details

#durationObject

Duration of the video in seconds as defined by sender.



32
33
34
# File 'lib/objects/video_note.rb', line 32

def duration
  @note.duration
end

#file_idObject

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



16
17
18
# File 'lib/objects/video_note.rb', line 16

def file_id
  @note.file_id
end

#file_sizeObject

Optional. File size



37
38
39
# File 'lib/objects/video_note.rb', line 37

def file_size
  @note.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.



22
23
24
# File 'lib/objects/video_note.rb', line 22

def file_unique_id
  @note.file_unique_id
end

#lengthObject

Video width and height (diameter of the video message) as defined by sender.



27
28
29
# File 'lib/objects/video_note.rb', line 27

def length
  @note.length
end

#thumbObject

Optional. Video thumbnail. Returns PhotoSize object.



42
43
44
45
46
47
# File 'lib/objects/video_note.rb', line 42

def thumb
  data = @note.thumb
  return false unless data
 
  PhotoSize.new(data)
end