Class: UnFichierApi::Folder

Inherits:
Base
  • Object
show all
Defined in:
lib/un_fichier_api/folder.rb

Class Method Summary collapse

Methods inherited from Base

call, connection

Class Method Details

.create(name: nil, folder_id: nil, sharing_user: nil) ⇒ Object



7
8
9
10
# File 'lib/un_fichier_api/folder.rb', line 7

def create(name: nil, folder_id: nil, sharing_user: nil)
  body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding
  call path: action_route('mkdir'), body: body
end

.list(folder_id: nil, sharing_user: nil, files: nil) ⇒ Object



12
13
14
15
# File 'lib/un_fichier_api/folder.rb', line 12

def list(folder_id: nil, sharing_user: nil, files: nil)
  body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding
  call path: action_route('ls'), body: body
end

.move(folder_id: nil, destination_folder_id: nil, destination_user: nil, rename: nil) ⇒ Object



17
18
19
20
# File 'lib/un_fichier_api/folder.rb', line 17

def move(folder_id: nil, destination_folder_id: nil, destination_user: nil, rename: nil)
  body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding
  call path: action_route('mv'), body: body
end

.remove(folder_id: nil) ⇒ Object



22
23
24
25
# File 'lib/un_fichier_api/folder.rb', line 22

def remove(folder_id: nil)
  body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding
  call path: action_route('rm'), body: body
end

.share(folder_id: nil, share: nil, pass: nil, shares: []) ⇒ Object



27
28
29
30
# File 'lib/un_fichier_api/folder.rb', line 27

def share(folder_id: nil, share: nil, pass: nil, shares: [])
  body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding
  call path: action_route('share'), body: body
end