Class: Kintone::Command::File

Inherits:
Kintone::Command show all
Defined in:
lib/kintone/command/file.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Kintone::Command

#initialize

Constructor Details

This class inherits a constructor from Kintone::Command

Class Method Details

.pathObject



4
5
6
# File 'lib/kintone/command/file.rb', line 4

def self.path
  'file'
end

Instance Method Details

#get(file_key) ⇒ Object



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

def get(file_key)
  @api.get(@url, fileKey: file_key)
end

#register(path, content_type, original_filename) ⇒ Object



12
13
14
# File 'lib/kintone/command/file.rb', line 12

def register(path, content_type, original_filename)
  @api.post_file(@url, path, content_type, original_filename)
end