also looking at this
storage endpoints
#56
1 file
+39
-0
| @@ -473,6 +473,45 @@ class Media | ||
| 473 | 473 | return $this->client->request('GET', "tags/{$id}/media"); |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | /** | |
| 477 | * Set the visibility for a file. | |
| 478 | * | |
| 479 | * @param string $path | |
| 480 | * @param string $visibility | |
| 481 | * | |
| 482 | * @return array|false file meta data | |
| 483 | */ | |
| 484 | public function setVisibility($path, $visibility) | |
| 485 | { | |
| 486 | return $this->client->request('POST', 'aws/set-visibility', compact('path', 'visibility')); | |
| 487 | } | |
| 488 | ||
| 489 | /** | |
| 490 | * Check whether a file exists. | |
| 491 | * | |
| 492 | * @param string $path | |
| 493 | * | |
| 494 | * @return bool | |
| 495 | */ | |
| 496 | public function has($path) | |
| 497 | { | |
| 498 | $data = $this->client->request('POST', 'aws/has', compact('path')); | |
| 499 | ||
| 500 | return $data['exists'] ?? false; | |
| 501 | } | |
| 502 | ||
| 503 | /** | |
| 504 | * Get all the meta data of a file or directory. | |
| 505 | * | |
| 506 | * @param string $path | |
| 507 | * | |
| 508 | * @return false|array | |
| 509 | */ | |
| 510 | public function getMetadata($path) | |
| 511 | { | |
| 512 | return $this->client->request('POST', 'aws/metadata', compact('path')); | |
| 513 | } | |
| 514 | ||
| 476 | 515 | /** |
| 477 | 516 | * Fetch child relations for this instance. |
| 478 | 517 | * |