Open coleshaw opened 4 years ago
The list endpoint folder#list
is pretty wonky right now - it returns a hash containing { files, folders }. This is no kind of object, really, and doesn't include, for example, the folder_name or any other folder metadata.
You may also list buckets with bucket#list
, which gives you a bunch of Metis::Bucket#to_hash
.
Meanwhile, there is no file#list
at all, the only way to get file information is by listing the parent folder.
These could (should) all be consolidated into an endpoint that worked more like ls
, that is, you could give it an arbitrary list of paths, and metis would return a listing of those paths. We can dispense with folder#list
, bucket#list
, etc., since we could have a single query that lists both a folder and all the buckets, or some of the buckets, some specific files, etc.
Finally, this endpoint should support some sort of globbing in paths, allowing you to match multiple entries with a single argument. These are all just appended to the output list, which is a json description of each of the returned objects, whether bucket, file, or folder.
Related to #69, perhaps we just need a set of general bulk operation endpoints, like bulk list, bulk delete, and bulk copy. Maybe we implement as needed?