Class: UnFichierApi::File
Class Method Summary collapse
- .change_attributes(urls: [], filename: nil, description: nil, pass: nil, no_ssl: nil, inline: nil, cdn: nil, acl: { ip: [], country: [], email: [], premium: nil }) ⇒ Object
- .copy(urls: [], folder_id: nil, pass: nil, sharing_user: nil, rename: nil) ⇒ Object
- .download(url: nil, inline: nil, cdn: nil, restrict_ip: nil, single: nil, pass: nil, no_ssl: nil, folder_id: nil, filename: nil, sharing_user: nil) ⇒ Object
- .info(url: nil, pass: nil, folder_id: nil, filename: nil, sharing_user: nil) ⇒ Object
- .list(folder_id: nil, sharing_user: nil, sent_before: nil, sent_after: nil) ⇒ Object
- .move(urls: [], destination_folder_id: nil, destination_user: nil, rename: nil) ⇒ Object
- .remove(files: []) ⇒ Object
- .rename(urls: []) ⇒ Object
- .scan(url: nil) ⇒ Object
Methods inherited from Base
Class Method Details
.change_attributes(urls: [], filename: nil, description: nil, pass: nil, no_ssl: nil, inline: nil, cdn: nil, acl: { ip: [], country: [], email: [], premium: nil }) ⇒ Object
7 8 9 10 |
# File 'lib/un_fichier_api/file.rb', line 7 def change_attributes(urls: [], filename: nil, description: nil, pass: nil, no_ssl: nil, inline: nil, cdn: nil, acl: { ip: [], country: [], email: [], premium: nil }) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('chattr'), body: body end |
.copy(urls: [], folder_id: nil, pass: nil, sharing_user: nil, rename: nil) ⇒ Object
12 13 14 15 |
# File 'lib/un_fichier_api/file.rb', line 12 def copy(urls: [], folder_id: nil, pass: nil, sharing_user: nil, rename: nil) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('cp'), body: body end |
.download(url: nil, inline: nil, cdn: nil, restrict_ip: nil, single: nil, pass: nil, no_ssl: nil, folder_id: nil, filename: nil, sharing_user: nil) ⇒ Object
17 18 19 20 |
# File 'lib/un_fichier_api/file.rb', line 17 def download(url: nil, inline: nil, cdn: nil, restrict_ip: nil, single: nil, pass: nil, no_ssl: nil, folder_id: nil, filename: nil, sharing_user: nil) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: 'download/get_token.cgi', body: body end |
.info(url: nil, pass: nil, folder_id: nil, filename: nil, sharing_user: nil) ⇒ Object
22 23 24 25 |
# File 'lib/un_fichier_api/file.rb', line 22 def info(url: nil, pass: nil, folder_id: nil, filename: nil, sharing_user: nil) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('info'), body: body end |
.list(folder_id: nil, sharing_user: nil, sent_before: nil, sent_after: nil) ⇒ Object
27 28 29 30 |
# File 'lib/un_fichier_api/file.rb', line 27 def list(folder_id: nil, sharing_user: nil, sent_before: nil, sent_after: nil) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('ls'), body: body end |
.move(urls: [], destination_folder_id: nil, destination_user: nil, rename: nil) ⇒ Object
32 33 34 35 |
# File 'lib/un_fichier_api/file.rb', line 32 def move(urls: [], 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(files: []) ⇒ Object
37 38 39 40 |
# File 'lib/un_fichier_api/file.rb', line 37 def remove(files: []) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('rm'), body: body end |
.rename(urls: []) ⇒ Object
42 43 44 45 |
# File 'lib/un_fichier_api/file.rb', line 42 def rename(urls: []) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('rename'), body: body end |
.scan(url: nil) ⇒ Object
47 48 49 50 |
# File 'lib/un_fichier_api/file.rb', line 47 def scan(url: nil) body = body_from_parameters parameters: method(__method__).parameters, method_binding: binding call path: action_route('scan'), body: body end |