ReviewOS

also looking at this

meemalabs/meema-client-php

storage endpoints

#56
Merged glennmichael123 wants to merge storage-endpoints into main
1 file +39 -0

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

src/Models/Media.phpmodified+39-0
Changes to src/Models/Media.php
@@ -473,6 +473,45 @@ class Media
473473 return $this->client->request('GET', "tags/{$id}/media");
474474 }
475475
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
476515 /**
477516 * Fetch child relations for this instance.
478517 *