Module: ChatWork::Client::FileMethods
- Included in:
 - ChatWork::Client
 
- Defined in:
 - lib/chatwork/client/file_methods.rb
 
Instance Method Summary collapse
- 
  
    
      #create_file(room_id:, file:, message: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash 
    
    
      (also: #upload_file)
    
  
  
  
  
  
  
  
  
  
    
Upload a new file to room.
 - 
  
    
      #find_file(room_id:, file_id:, create_download_url: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash 
    
    
  
  
  
  
  
  
  
  
  
    
Get information about the specified file.
 - 
  
    
      #get_files(room_id:, account_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash> 
    
    
  
  
  
  
  
  
  
  
  
    
Get the list of files associated with the specified chat.
 
Instance Method Details
#create_file(room_id:, file:, message: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash Also known as: upload_file
Upload a new file to room
      92 93 94 95 96 97 98 99  | 
    
      # File 'lib/chatwork/client/file_methods.rb', line 92 def create_file(room_id:, file:, message: nil, &block) params = { file: file, message: , } post("/rooms/#{room_id}/files", params, &block) end  | 
  
#find_file(room_id:, file_id:, create_download_url: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get information about the specified file
      64 65 66  | 
    
      # File 'lib/chatwork/client/file_methods.rb', line 64 def find_file(room_id:, file_id:, create_download_url: nil, &block) get("/rooms/#{room_id}/files/#{file_id}", create_download_url: boolean_to_integer(create_download_url), &block) end  | 
  
#get_files(room_id:, account_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of files associated with the specified chat
      31 32 33  | 
    
      # File 'lib/chatwork/client/file_methods.rb', line 31 def get_files(room_id:, account_id:, &block) get("/rooms/#{room_id}/files", account_id: account_id, &block) end  |