Module: ChatWork::File
- Defined in:
- lib/chatwork/file.rb
Class Method Summary collapse
-
.create(room_id:, file:, message: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
(also: upload)
Upload a new file to room.
-
.find(room_id:, file_id:, create_download_url: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get information about the specified file.
-
.get(room_id:, account_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of files associated with the specified chat.
Class Method Details
.create(room_id:, file:, message: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash Also known as: upload
Upload a new file to room
92 93 94 |
# File 'lib/chatwork/file.rb', line 92 def self.create(room_id:, file:, message: nil, &block) ChatWork.client.create_file(room_id: room_id, file: file, message: , &block) end |
.find(room_id:, file_id:, create_download_url: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get information about the specified file
65 66 67 |
# File 'lib/chatwork/file.rb', line 65 def self.find(room_id:, file_id:, create_download_url: nil, &block) ChatWork.client.find_file(room_id: room_id, file_id: file_id, create_download_url: create_download_url, &block) end |
.get(room_id:, account_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of files associated with the specified chat
32 33 34 |
# File 'lib/chatwork/file.rb', line 32 def self.get(room_id:, account_id:, &block) ChatWork.client.get_files(room_id: room_id, account_id: account_id, &block) end |