@@ 139-146 (lines=8) @@ | ||
136 | * |
|
137 | * @return string |
|
138 | */ |
|
139 | public function delete(array $file_ids = []) |
|
140 | { |
|
141 | $file_ids = implode(',', $file_ids); |
|
142 | ||
143 | return $this->client->post('files/delete', [ |
|
144 | 'form_params' => compact('file_ids'), |
|
145 | ]); |
|
146 | } |
|
147 | ||
148 | /** |
|
149 | * Renames given file/folder. |
|
@@ 264-272 (lines=9) @@ | ||
261 | * |
|
262 | * @return string |
|
263 | */ |
|
264 | public function share(array $file_ids = [], array $friends = []) |
|
265 | { |
|
266 | return $this->client->post('files/share', [ |
|
267 | 'form_params' => [ |
|
268 | 'file_ids' => implode(',', $file_ids), |
|
269 | 'friends' => implode(',', $friends), |
|
270 | ], |
|
271 | ]); |
|
272 | } |
|
273 | ||
274 | /** |
|
275 | * Returns list of shared files and share information. |
|
@@ 317-324 (lines=8) @@ | ||
314 | * |
|
315 | * @return string |
|
316 | */ |
|
317 | public function unshare(int $id, array $friends = []) |
|
318 | { |
|
319 | return $this->client->post(sprintf('files/%d/unshare', $id), [ |
|
320 | 'form_params' => [ |
|
321 | 'shares' => count($friends) ? implode(',', $friends) : 'everyone', |
|
322 | ], |
|
323 | ]); |
|
324 | } |
|
325 | ||
326 | /** |
|
327 | * Lists available subtitles for user’s preferred language. |
@@ 34-41 (lines=8) @@ | ||
31 | * |
|
32 | * @return string |
|
33 | */ |
|
34 | public function create(array $file_ids = []) |
|
35 | { |
|
36 | return $this->client->post('zips/create', [ |
|
37 | 'form_params' => [ |
|
38 | 'file_ids' => implode(',', $file_ids), |
|
39 | ], |
|
40 | ]); |
|
41 | } |
|
42 | ||
43 | /** |
|
44 | * Lists active zip files. |