Module: Telegram::NonStandard
Instance Method Summary collapse
-
#create_text_link(message, url) ⇒ Object
use ‘markdow’ for parse_mode.
-
#create_user_link(name, user_id) ⇒ Object
use ‘markdown’.
- #download_file(file_d, dir = Dir.pwd) ⇒ Object
- #download_file_from(uri, dir = Dir.pwd) ⇒ Object
Methods included from CoreApi
Instance Method Details
#create_text_link(message, url) ⇒ Object
use ‘markdow’ for parse_mode
25 26 27 |
# File 'lib/api/nstandard.rb', line 25 def create_text_link(, url) "[#{}](#{url})" end |
#create_user_link(name, user_id) ⇒ Object
use ‘markdown’
20 21 22 |
# File 'lib/api/nstandard.rb', line 20 def create_user_link(name, user_id) "[#{name}](tg://user?id=#{id})" end |
#download_file(file_d, dir = Dir.pwd) ⇒ Object
10 11 12 |
# File 'lib/api/nstandard.rb', line 10 def download_file(file_d, dir = Dir.pwd) d = Dir.new(dir) end |
#download_file_from(uri, dir = Dir.pwd) ⇒ Object
14 15 16 17 |
# File 'lib/api/nstandard.rb', line 14 def download_file_from(uri, dir = Dir.pwd) uri = URI.parse(uri) end |